From 05293487ae8276b0e98b1ce4aab0e101045dce73 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Mar 2014 11:09:05 -0400 Subject: doubled speed with esqeleto --- doc/design/caching_database.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/design/caching_database.mdwn') diff --git a/doc/design/caching_database.mdwn b/doc/design/caching_database.mdwn index 2eacc9bc5..e789244f7 100644 --- a/doc/design/caching_database.mdwn +++ b/doc/design/caching_database.mdwn @@ -18,6 +18,9 @@ generated and updated by looking at the git repository. "regenerated" by running fsck again. (Perhaps doesn't quite fit, but let it slide..) +Store in the database the Ref of the branch that was used to construct it. +(Update in same transaction as cached data.) + ## case study: persistent with sqllite Here's a non-normalized database schema in persistent's syntax. @@ -93,6 +96,10 @@ With this, 1000 queries takes 0.406s. Note that persistent is probably not actually doing a join at the SQL level, so this could be sped up using eg, esquelito. +Update2: Using esquelito to do a join got this down to 0.250s. + +Code: + Compare the above with 1000 calls to `associatedFiles`, which is approximately as fast as just opening and reading 1000 files, so will take well under 0.05s with a **cold** cache. -- cgit v1.2.3