Speed up twisted.python.context by copying less data
|Reported by:||exarkun||Owned by:||exarkun|
(github, coverage, patch, buildbot, log)
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.
Change History (6)
comment:5 Changed 5 years ago by cyli
- Keywords review removed
- Owner changed from cyli to exarkun
- Status changed from assigned to new