Skip to content
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

Add a cache for state_getKeysPaged requests #361

Merged
merged 2 commits into from
Mar 28, 2023

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Mar 28, 2023

cc #351

@github-actions
Copy link

github-actions bot commented Mar 28, 2023

twiggy diff report

Difference in .wasm size before and after this pull request.


 Delta Bytes │ Item
─────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       +6699 ┊ smoldot_light::json_rpc_service::background::Background<TPlat>::runtime_lock::{{closure}}::h9d628d058b3986f8
       -6699 ┊ smoldot_light::json_rpc_service::background::Background<TPlat>::runtime_lock::{{closure}}::hb9601494b95dbab3
       -2119 ┊ futures_util::abortable::Abortable<T>::try_poll::h12278d4e1fcbf895
       +2119 ┊ futures_util::abortable::Abortable<T>::try_poll::h61ea2ba7b294a3d8
       +1192 ┊ smoldot_light::json_rpc_service::background::Background<TPlat>::state_trie_root_hash::{{closure}}::hdbf455a661796e3d
       -1192 ┊ smoldot_light::json_rpc_service::background::Background<TPlat>::state_trie_root_hash::{{closure}}::hfea723335250adb0
       +1022 ┊ smoldot_light::json_rpc_service::background::Background<TPlat>::handle_request::{{closure}}::hf803cfc2f8737078
        +484 ┊ lru::LruCache<K,V,S>::capturing_put::h945d1c535b67f71b
        +463 ┊ hashbrown::raw::RawTable<T,A>::reserve_rehash::h3543502624f55175
        +366 ┊ lru::LruCache<K,V,S>::replace_or_create_node::h06f88b7315d660e3
        -360 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold::h70fca7cc718a17be
        +309 ┊ core::ptr::drop_in_place<smoldot_light::json_rpc_service::background::state_chain::<impl smoldot_light::json_rpc_service::background::Background<smoldot_light_wasm::platform::Platform>>::state_get_keys_paged::{{closure}}>::h5178600ea652a378
        -297 ┊ core::ptr::drop_in_place<futures_util::abortable::Abortable<smoldot_light::json_rpc_service::background::start<smoldot_light_wasm::platform::Platform>::{{closure}}>>::h3339986ee932f72f
        +297 ┊ core::ptr::drop_in_place<futures_util::abortable::Abortable<smoldot_light::json_rpc_service::background::start<smoldot_light_wasm::platform::Platform>::{{closure}}>>::h7d15a7919315e14d
        +266 ┊ futures_util::lock::mutex::Mutex<T>::remove_waker::h540509be2642ac7e
        -266 ┊ futures_util::lock::mutex::Mutex<T>::remove_waker::h634fcd083097b995
        +250 ┊ core::ptr::drop_in_place<smoldot_light::json_rpc_service::background::Background<smoldot_light_wasm::platform::Platform>::runtime_lock::{{closure}}>::h4dfede76173df05f
        -250 ┊ core::ptr::drop_in_place<smoldot_light::json_rpc_service::background::Background<smoldot_light_wasm::platform::Platform>::runtime_lock::{{closure}}>::he7db6f41156b6cad
        +235 ┊ <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter::h020c150221b29530
        -207 ┊ core::ptr::drop_in_place<smoldot_light::json_rpc_service::background::state_chain::<impl smoldot_light::json_rpc_service::background::Background<smoldot_light_wasm::platform::Platform>>::state_get_keys_paged::{{closure}}>::h3b0283282c0ab07e
       +2643 ┊ ... and 77 more.
       +7877 ┊ Σ [97 Total Rows]

@tomaka tomaka enabled auto-merge March 28, 2023 12:36
@tomaka tomaka added this pull request to the merge queue Mar 28, 2023
Merged via the queue into smol-dot:main with commit 7bf22e6 Mar 28, 2023
@tomaka tomaka deleted the cache-get-keys-paged branch March 28, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant