Feature Proposal: Prevent redundant file reads in store

Motivation

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

Examples

Impact

%WHATDOESITAFFECT%
edit

Implementation

-- Contributors: MichaelDaum - 27 Jul 2015

Discussion

Pushing this out to 2.2, a number of the issues reported here have been addressed in other patches.

-- GeorgeClark - 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.

-- GeorgeClark - 20 Mar 2016
 
Topic revision: r4 - 30 Jan 2018, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy