Summary | Performance issues with Horde Routes |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | chuck (at) horde (dot) org |
Requester | fabio.bacigalupo (at) gmail (dot) com |
Created | 09/08/2009 (5781 days ago) |
Due | |
Updated | 04/05/2010 (5572 days ago) |
Assigned | 09/09/2009 (5780 days ago) |
Resolved | 04/05/2010 (5572 days ago) |
Milestone | |
Patch | No |
Taken from Mike Naberezny
State ⇒ Feedback
First attempt at optional caching of Horde_Routes generated mappings
(
Request #8563).http://git.horde.org/diff.php/framework/Routes/lib/Horde/Routes/Mapper.php?rt=horde-git&r1=f55b55a2e47fced46ca6fb2d34720cfec9301e9d&r2=0fefb6277b9d7677f98a35844545422bf346cb77
Assigned to Mike Naberezny
Assigned to Chuck Hagenbuch
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Performance issues with Horde Routes
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ New
0.4). We are using HR as part of the Seagull framework where the Horde
Routes package is integrated very nicely.
We have around 200 rules for Horde Routes to process. If I test with
just one rule the function _createGens() takes 0,16ms. With 50 active
rules the function takes around 18ms to pass. With all of them active
the same function in Horde/Routes/Mapper.php takes a bit more than
1000ms on every page request to execute. It seems there is a
correlation between the number of rules and the execution time which
increases drastically on every rule added after a certain point.
It's no surprise looking at the code of _createGens() which iterates
through the list of rules three times.
A possible solution is to cache the entire "$gendict" in Mapper.php
(~line 330-380) after it is first generated.
This ticket is a follow-up to a conversation [1],[2] held on the dev list.
[1] http://lists.horde.org/archives/dev/Week-of-Mon-20090817/024285.html
[2] http://lists.horde.org/archives/dev/Week-of-Mon-20090824/024313.html