Summary | Reduce session size by improving registry caching |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | |
Requester | slusarz (at) horde (dot) org |
Created | 02/23/2009 (5979 days ago) |
Due | |
Updated | 03/12/2009 (5962 days ago) |
Assigned | |
Resolved | 03/12/2009 (5962 days ago) |
Milestone | |
Patch | No |
State ⇒ Feedback
http://cvs.horde.org/diff.php/framework/Horde/Horde/Registry.php?rt=horde&r1=1.323&r2=1.324&ty=u
http://cvs.horde.org/diff.php/horde/docs/CHANGES?rt=horde&r1=1.1211&r2=1.1212&ty=u
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Reduce session size by improving registry caching
Type ⇒ Enhancement
State ⇒ Accepted
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).