Log module needs to be optimized (optimization was intentionaly left to be done when time permits). Currently, log module goes thru all log files, line by line, and picks the lines that match request. Every request contains time variable; parts of log files to be processed can be greatly reduced by the fact that logs are already sorted by time.
i committed one optimization for this: ignoring logs with an mtime too old to be a candidate for matching messages given the max age. there's still a lot of room for improvement, though. strftime is insanely slow, given what it does, and it can still bail once it hits one message in a log that's too old, etc.
marking as modified. ignoring logs that are too old to contain matches reduces the time it takes to retrieve logs on camel.lab.msp from over 10 minutes to under 30 seconds.
Bug fix verified with: luci-0.8-29.el5 ricci-0.8-29.el5