diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-13 11:09:05 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-13 11:09:05 -0400 |
commit | 05293487ae8276b0e98b1ce4aab0e101045dce73 (patch) | |
tree | e47cea49bc8e2f7694c836dba51b65f823e72b44 /doc/design/caching_database.mdwn | |
parent | 9e74fef4a440f23d3461cad8f46d3f10e3bf1fe7 (diff) |
doubled speed with esqeleto
Diffstat (limited to 'doc/design/caching_database.mdwn')
-rw-r--r-- | doc/design/caching_database.mdwn | 7 |
1 files changed, 7 insertions, 0 deletions
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: <http://lpaste.net/101141> <http://lpaste.net/101142> + 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. |