Skip to content

Remove submodule overhead if no submodules - #5713

Closed
joshua-spacetime wants to merge 3 commits into
masterfrom
joshua/fix/keynote-bench
Closed

Remove submodule overhead if no submodules#5713
joshua-spacetime wants to merge 3 commits into
masterfrom
joshua/fix/keynote-bench

Conversation

@joshua-spacetime

@joshua-spacetime joshua-spacetime commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Description of Changes

Before this change, every reducer call did the following:

  1. Checked whether it belonged to the root module or a submodule.
  2. Retrieved the appropriate ctx.db.
  3. Retrieved the appropriate ctx.as.
  4. Reassigned both properties on the reusable reducer context.

This was true whether or not the module had any submodules, and this added meaningful overhead especially for high throughput workloads, such as the keynote benchmark.

Now if a module doesn't have any submodules, reducer calls take an early fast path. It directly selects the root reducer and resets only values that genuinely change each transaction.

API and ABI breaking changes

N/A

Expected complexity level and risk

1

Testing

  • Revert keynote bench throughput

@joshua-spacetime
joshua-spacetime force-pushed the joshua/fix/keynote-bench branch from 564195a to 0ac4e81 Compare August 10, 2026 23:05
@joshua-spacetime

Copy link
Copy Markdown
Collaborator Author

So far, none of these changes have had any impact on the keynote bench throughput.

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