[#8563] Performance issues with Horde Routes
Summary Performance issues with Horde Routes
Queue Horde Framework Packages
Queue Version Git master
Type Enhancement
State Feedback
Priority 1. Low
Owners Chuck Hagenbuch <chuck (at) horde (dot) org>
Requester fabio (dot) bacigalupo (at) gmail (dot) com
Created 09/08/09 (185 days ago)
Due
Updated 09/25/09 (168 days ago)
Assigned 09/09/09 (184 days ago)
Resolved
Attachments
Milestone
Patch No

History
09/25/09 Chuck Hagenbuch Comment #3
State ⇒ Feedback
Taken from Mike Naberezny
Reply to this comment
Can someone please try what I committed here?
09/25/09 CVS Commit Comment #2 Reply to this comment
09/09/09 Jan Schneider State ⇒ Assigned
Assigned to Mike Naberezny
Assigned to Chuck Hagenbuch
 
09/08/09 fabio (dot) bacigalupo (at) gmail (dot) com Comment #1
State ⇒ New
Patch ⇒
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Performance issues with Horde Routes
Type ⇒ Enhancement
Priority ⇒ 1. Low
Reply to this comment
We are experiencing performance issues with Horde Routes (version 
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