You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's super slow and naive right now, reloading the entire history every time it is used. Here are many ideas I have had, from simplest to cleverest:
Make it actually a cache, stored globally over the lifetime of the process
Downside: doesn't help for CLI use cases, where the process is short-lived
Make it a persistent cache - can use an index-style approach where on every commit, we update a persistent set of all known reachable commits
Downside: the index and truth can get out of date
Implement Contains() incrementally -- Refs contain a height field, so it is possible to implement Contains() without walking the entire tree. In most cases we're going to be checking commits that have a height that is higher than the latest known-good commit, so if we added this, it Contains() would instantly become a no-op
We need to improve the implementation of history in noms anyway, because it is very slow. One of the proposed solutions would make the need for history.Cache go away completely since it would store an index of all reachable commits on every commit.
Downside - same as (2) - the index can conceivably be out of date with truth.
Noms actually already internally stores all chunks that are reachable from the current committed database state. The only reason this doesn't work for us is that it tracks all written chunks, not all reachable chunks. So relying on this would be a bit brittle.
The text was updated successfully, but these errors were encountered:
It's super slow and naive right now, reloading the entire history every time it is used. Here are many ideas I have had, from simplest to cleverest:
Contains()
incrementally --Ref
s contain aheight
field, so it is possible to implementContains()
without walking the entire tree. In most cases we're going to be checking commits that have a height that is higher than the latest known-good commit, so if we added this, itContains()
would instantly become a no-ophistory.Cache
go away completely since it would store an index of all reachable commits on every commit.The text was updated successfully, but these errors were encountered: