-
Notifications
You must be signed in to change notification settings - Fork 2
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
Performance degradation in cache DB #40
Comments
This happens because the underlying structure of indexes are maps. When reading/writing a key from an index, what effectively happens is reading the entire map from the DB, decoding into memory, make the necessary changes, encode in binary format and write it back to the DB. Because the thumbnail flag only have two states (true of false), all photos will be referenced or by one (true) or the other (false). If the number of photos grows, so do the maps in the indexes. In scenario where the thumbnails are already generated but the cache needs to update the thumbnail flag, what will happen is coping all the references from one key (false) to another (true), in batches. Each time a batch is ready to be committed, it must read, decode, apply changes, encode, write. |
Performance of saving to bbolt degrades when the DB grows in size, even when it is just updating an existing entry. This is more noticeable when updating the thumb flag.
The text was updated successfully, but these errors were encountered: