Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make runtime of session handling be in O(1) #69
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.