[Tickets #8024] Reduce session size by improving registry caching
bugs at horde.org
bugs at horde.org
Mon Feb 23 19:38:38 UTC 2009
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/8024
------------------------------------------------------------------------------
Ticket | 8024
Created By | Michael Slusarz <slusarz at horde.org>
Summary | Reduce session size by improving registry caching
Queue | Horde Framework Packages
Version | Git master
Type | Enhancement
State | Accepted
Priority | 1. Low
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
Michael Slusarz <slusarz at horde.org> (2009-02-23 14:38) wrote:
At present, cached registry data takes up a large percentage of
session data. e.g. - quick benchmark on load of IMP 5 shows session
size (obtained via strlen(serialize($_SESSION))) to be approx. 70 K.
Of this, registry cache is approx. 25 K (this installation only has
imp, turba, and chora active).
Most of this registry data is not used in any given page access, let
alone ever in the session. So it would be best to cache only the
registry info that has actually be used in the session, and offload
the rest to a shared memory location where it can be accessed, but
doesn't pollute every user's session.
Initial thoughts is to use Horde_Cache or sqlite. Horde_cache has the
advantage that it does not need to be complied into server like sqlite
does (sqlite requires various modules to be loaded via php.ini). But
cache should be local to the particular server rather than global.
Pseudocode:
On load, create the registry cache object for the user and get an md5
sum of it.
Store this sum in session data.
Store registry cache data if it does not already exist.
Load registry cache object into memory as needed (Horde_Cache) or use
SQL commands (sqlite) to obtain cache information.
For any registry cache info used, store this data in session.
increased storage size offset by reduced costs of obtaining cache
information from cache store (assumption is that if Horde code needs
registry cache info once, it will need the same code/info on
subsequent page loads).
More information about the bugs
mailing list