Extended the ProtoDatabase to provide LoadKeys() functionality.
Before this change, the only way to scan all keys was to call LoadEntries() which loads the whole database. In our use case, this means copying a lot of image data which is wasteful. With LoadKeys(), we still need to iterate the whole database but we don't have to copy out (and parse) the values -- just the keys. LoadKeys() is useful when storing relatively large values and only access to the keys is required. We'll use LoadKeys() for NTP content suggestions to garbage collect data. We do that at times when we have a list of all still alive elements and need to intersect that with the elements stored in the db. BUG=649009 Review-Url: https://codereview.chromium.org/2379113002 Cr-Commit-Position: refs/heads/master@{#422772}
Showing
Please register or sign in to comment