Tech Revolution: Hubble Application Supercharges Performance with Key Code Fixes!
Streamlined message handling and optimized data retrieval make for unprecedented efficiency in groundbreaking update.
Commit Details:
fix: Use pageSize=1 to get first key in iterator (#1922) ## Motivation Some assorted perf fixes: - Use pageSize =1 when getting just the first key - Limit merge queue to 5000 items. If there is a merge queue, which should skip messages - When pruning, prune all messages in a single Tx instead of multiple transactions ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [X] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [X] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [ ] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. - [X] All [commits have been signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits) <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on improving efficiency in scanning for the first key and reducing message queue size in the Hubble application. ### Detailed summary - Reduced `MAX_MESSAGE_QUEUE_SIZE` to 5000 in `gossipNode.ts` - Modified key scanning to use `pageSize=1` in `storageCache.ts` - Refactored transaction handling in `store.rs` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->