Ticket #4960 enhancement closed fixed
Speed up twisted.python.context by copying less data
|Reported by:||exarkun||Owned by:||exarkun|
|Author:||exarkun, fijal||Launchpad Bug:|
ContextTracker.callWithContext makes a copy of the current context and update it with the new context data. This makes callWithContext somewhat expensive, even if no code actually loads anything from the context.
Contrariwise, it makes it easy to retrieve keys from the context, which most code doesn't bother to do.
We should reverse these, making callWithContext as cheap as we can, even at the cost of slowing down getContext somewhat.