nahi/httpclient — Issue #69: Make runtime of session handling be in O(1)
Author: xb
Created: 2011-10-13 15:36:52+00:00
State: open

Currently the time to handle one session (get_cached_session, add_cached_session) is in O(n) (where n is the number of already open sessions). As n can get up to 1000 or more in certain applications, adding and removing sessions can become quite wasteful in terms of CPU and RAM bandwidth. Additionally, because these actions are done while a Mutex is held, this cannot even be "optimized" by adding CPU power.