Skip to content

svm: cache sysvar read lock per transaction batch#11604

Open
atorrers wants to merge 1 commit intoanza-xyz:masterfrom
atorrers:svm-cache-sysvar-lock-per-batch
Open

svm: cache sysvar read lock per transaction batch#11604
atorrers wants to merge 1 commit intoanza-xyz:masterfrom
atorrers:svm-cache-sysvar-lock-per-batch

Conversation

@atorrers
Copy link
Copy Markdown

Problem

TransactionBatchProcessor currently reads sysvar_cache inside execute_loaded_transaction for each transaction, which adds repeated RwLock read overhead on a hot execution path.

Summary of Changes

  • Move sysvar_cache read to batch scope in load_and_execute_sanitized_transactions and reuse it across transactions.
  • Pass &SysvarCache into execute_loaded_transaction instead of reading the lock inside that function.
  • Update affected test call sites to pass the cached reference.
  • Add #[allow(clippy::too_many_arguments)] on execute_loaded_transaction to satisfy CI clippy rules after adding the new parameter.

@atorrers atorrers requested a review from a team as a code owner March 27, 2026 14:42
@Lichtso Lichtso added the CI Pull Request is ready to enter CI label Mar 27, 2026
@anza-team anza-team removed the CI Pull Request is ready to enter CI label Mar 27, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.0%. Comparing base (1518547) to head (ba31b6b).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #11604     +/-   ##
=========================================
- Coverage    83.0%    83.0%   -0.1%     
=========================================
  Files         850      850             
  Lines      322429   322437      +8     
=========================================
- Hits       267842   267807     -35     
- Misses      54587    54630     +43     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Lichtso Lichtso requested a review from 2501babe March 27, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants