This is an archive of the discontinued Mercurial Phabricator instance.

treemanifest: add a server side cache for tree entries
AbandonedPublic

Authored by durham on Jan 2 2018, 7:41 PM.
Tags
None
Subscribers

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

We're seeing high load on the server when many clients are fetching treemanifest
entries. A lot of this stems from the cost of opening revlogs. Let's introduce a
simple on-disk cache that let's us avoid opening revlogs as much as possible.

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durham created this revision.Jan 2 2018, 7:41 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 2 2018, 7:41 PM
durham added inline comments.Jan 2 2018, 7:42 PM
treemanifest/__init__.py
1821

I need to add cache cleanup here, but I wanted to get the review started.

quark added a subscriber: quark.Jan 5 2018, 4:36 PM

Do we have ideas about the detailed profiling result of what's slow? Is it building revlog index, or applying deltas?

The cache seems suboptimal on disk usage and inode count. Will simplecache be a sane choice here?

treemanifest/__init__.py
1760–1762

Should {} be getmeta? I guess getdelta won't be called in critical path so it's okay to be more expensive.

durham abandoned this revision.Jan 24 2018, 1:20 PM