-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a DB for the metadata #31
Comments
It seems that SQLite is slow as well, and it also does not play well with having a dependency and C-code free pak in the future, so I gave up on this. I think the best solution will be to write our own serialization, similarly to the qs package. |
RSQLite is not slow, after all: r-dbi/RSQLite#306 :) |
OK, this is not so great, because RSQLite depends on Rcpp and C++ is hard to compile statically, so it is hard to create a static installer. The same applies to the qs package. However, the thor package with embedded lmdb seems nice. It is a different approach, because it is just a key-value store, but it is transactional, and that's exactly what we need, even simpler than switching to a SQL DB. We need to serialize the metadata to a raw vector to store it in the DB. Also, we don't have to merge the different package sources in the cache, because thor can access all of them within a transaction, and merging them at loading time it quite fast. |
thor/lmdb does not have a timeout for locking, and it is also not interruptible, so if a process keeps a write-lock, then other processes just freeze. Probably not a big issue, but we need to be careful to only lock for a short time, and always abort the transaction in |
This will be postponed until after the next release. |
Experimenting with embedded sqlite: https://github.com/r-lib/pkgcache/tree/feature/sqlite |
No description provided.
The text was updated successfully, but these errors were encountered: