Perf: Store deserialized sysvars in the sysvars cache#22455
Perf: Store deserialized sysvars in the sysvars cache#22455mergify[bot] merged 2 commits intosolana-labs:masterfrom
Conversation
f66c52e to
98135f5
Compare
Codecov Report
@@ Coverage Diff @@
## master #22455 +/- ##
========================================
Coverage 81.1% 81.1%
========================================
Files 555 555
Lines 150561 150664 +103
========================================
+ Hits 122183 122324 +141
+ Misses 28378 28340 -38 |
|
@behzadnouri I opted not to use your commit and chose to only cache the sysvars which need to be requested from the invoke context. I think this approach is simpler, let me know what you think, thanks! |
cdedea8 to
a59c68b
Compare
|
Looking good, have you benched the differences? |
working on it |
683c890 to
3e56074
Compare
|
Added a bench.. seeing a 25% perf improvement for end to end vote processing (including sigverify, account loading, etc) |
* Perf: Store deserialized sysvars in sysvars cache * add bench (cherry picked from commit 2370e61) # Conflicts: # program-runtime/src/invoke_context.rs # program-runtime/src/sysvar_cache.rs # program-test/src/lib.rs # programs/address-lookup-table/src/processor.rs # programs/bpf_loader/src/syscalls.rs # programs/stake/src/stake_instruction.rs # programs/vote/src/vote_instruction.rs # programs/vote/src/vote_state/mod.rs # runtime/benches/bank.rs # runtime/src/bank.rs # runtime/src/bank/sysvar_cache.rs
* Perf: Store deserialized sysvars in sysvars cache * add bench (cherry picked from commit 2370e61) # Conflicts: # program-runtime/src/invoke_context.rs # program-runtime/src/sysvar_cache.rs # programs/bpf_loader/src/syscalls.rs # programs/stake/src/stake_instruction.rs # programs/vote/src/vote_instruction.rs # runtime/src/bank.rs # runtime/src/bank/sysvar_cache.rs
* Perf: Store deserialized sysvars in sysvars cache * add bench
|
This PR has been automatically locked since there has not been any activity in past 14 days after it was merged. |
| ) | ||
| }); | ||
|
|
||
| new.fill_missing_sysvar_cache_entries(); |
There was a problem hiding this comment.
this is a new invocation to cover this new code-path (ref: https://github.com/solana-labs/solana/pull/30158/files#r1098222823 #30158)
Problem
Deserializing sysvars is slow
Summary of Changes
Fixes #