Feature Proposal: Prevent redundant file reads in store
Investigating the most expensive calls in Foswiki-2.0.0 using nytprof shows that Foswiki::Store::Rcs::Handler::readFile() is called up to 18 times for the same file (PatterSkinNavigation
) and overall 118 files when visiting System
. That's quite a lot. Disk io is THE major bottleneck unless you are using SSDs.
There is a patch branch implementing this.
Description and Documentation
See also Tasks.Item13525
-- Contributors: MichaelDaum
- 27 Jul 2015
Pushing this out to 2.2, a number of the issues reported here have been addressed in other patches.
- 06 Dec 2015
I'm adding a concern, in that this doesn't really have a design to comment on. Many of the duplicate I/O's were fixed earlier when it was determined that the Meta Cache was not caching. With that fixed, we need to decide whether yet another layer of caching in store is the right thing, or if more use can be made of the Meta Cache. The Meta Cache seems to be only active in the search code. It avoids the significant overhead of de-serializing the topic meta in addition to avoiding extra I/O.
- 20 Mar 2016