Ticket #4960 enhancement closed fixed
Speed up twisted.python.context by copying less data
| Reported by: | exarkun | Owned by: | exarkun |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | |
| Cc: | Branch: | branches/faster-callwithcontext-4960 | |
| Author: | exarkun, fijal | Launchpad Bug: |
Description
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
Note: See
TracTickets for help on using
tickets.
