Opened 20 years ago
Last modified 4 years ago
#1216 new enhancement
wiki pages caching
Reported by: | zilvinas | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | next-major-releases |
Component: | wiki system | Version: | devel |
Severity: | normal | Keywords: | objectstore performance |
Cc: | zilvinas@…, shanec@…, mmitar@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Most of the time wiki pages can be considered as a static content. So instead of generating and regenerating wiki pages → html output, perhaps it would be useful to cache generated HTML output of wiki pages on the disk. Next time, page is requested checking if there have been changes - if not serve the file, otherwise - regenerate HTML page and serve newly generated file.
Sure this raises a question, what to do with embedded python macroses (see wiki-macros). Having such functionality, would help to reduce server load and would be very helpful especially with wiki rst (Restructured Text extension).
This ticket is rather an attempt to find out if there is a demand for such functionality. Consider this ticket as a discusion starting point.
Attachments (1)
Change History (13)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
The way I think is the following:
Wiki pages caching is optional (either enabled or disabled by default). Assuming caching is enabled, during wiki page serving it is possible to detect if wiki page makes use of macroses. (Searching for should be enough). Perhaps initial version, for simplicity, should not cache wiki pages with macroses in them.
In future, caching system can be smart enough always to execute macroses only without need to reproccess whole wiki page ? (execute macros, insert it's output at appropriate place in preprocessed wiki page and serve it … - perhaps that makes no sense).
comment:3 by , 19 years ago
Keywords: | objectstore added |
---|
Also, note that idea of a cache could be expanded to other things as well, like changesets, fontified source files, …
Disk is cheap, and a kind of LRU cache of a few Gbytes could speed things up quite a bit…
comment:6 by , 15 years ago
I've attached a hacked in cache for wiki output. It avoids cacheing macros unless there is a cache argument in the macro. With ApacheBench on my laptop, it reduced fetching WikiStart from 120-140ms to around 70ms.
comment:7 by , 15 years ago
Cc: | added |
---|
comment:9 by , 14 years ago
Keywords: | performance added |
---|---|
Milestone: | triaging → next-major-0.1X |
Priority: | normal → low |
Could still be a long term goal (bordering unscheduled).
comment:10 by , 13 years ago
Cc: | added |
---|
comment:11 by , 10 years ago
Owner: | removed |
---|
comment:12 by , 4 years ago
Here is my solution to LRU cache implementation in C++. LRU Cache there are various references I used to implement this Reference
So… what about wiki macros? The content they generate could change anytime. Would only pages that don't contain wiki macros be cached?