Skip to content

Inline was_mutated flag on native parser node hot path - #390

Merged
adamziel merged 1 commit into
trunkfrom
adamziel/native-node-perf
Apr 30, 2026
Merged

Inline was_mutated flag on native parser node hot path#390
adamziel merged 1 commit into
trunkfrom
adamziel/native-node-perf

Conversation

@adamziel

Copy link
Copy Markdown
Collaborator

Summary

Drop the was_mutated() getter from WP_MySQL_Native_Parser_Node and read the property directly. The flag is checked on every read of a native-backed node, so a method call per access shows up on full-tree traversals.

The naming still reads at the call sites (if ( \$this->was_mutated )), so we don't lose anything by inlining.

Drop the trivial getter and read the property directly. The check fires
on every read of a native-backed node, so saving a method call adds up
on full-tree traversals.
@adamziel
adamziel merged commit fa5a7ba into trunk Apr 30, 2026
16 checks passed
@adamziel
adamziel deleted the adamziel/native-node-perf branch April 30, 2026 13:05
@JanJakes JanJakes mentioned this pull request Jun 19, 2026
JanJakes added a commit that referenced this pull request Jun 19, 2026
## Release `3.0.0-rc.4`

Version bump and changelog update for release `3.0.0-rc.4`.

**Changelog draft:**
* Normalize BIT column default literals
([#439](#439))
* Optimize MySQL lexer (~2× speedup)
([#424](#424))
* Fix `RAND()` function behavior
([#363](#363))
* CI: Disable Xdebug, use Rust release builds, consolidate unit-test
matrix
([#425](#425))
* GitHub Actions workflow updates
([#404](#404))
* Add native Rust-based MySQL parser extension
([#381](#381),
[#384](#384),
[#386](#386),
[#389](#389),
[#390](#390),
[#394](#394),
[#398](#398))
* Ship native parser as WASM
([#395](#395),
[#396](#396),
[#397](#397),
[#399](#399),
[#400](#400),
[#401](#401))
* Add SQLite plugin landing page
([#407](#407),
[#412](#412))
* Check Playground web runtime compatibility
([#419](#419))

**Full changelog:**
v3.0.0-rc.3...release/v3.0.0-rc.4

## Next steps

1. **Review** the changes in this pull request.
2. **Push** any additional edits to this branch (`release/v3.0.0-rc.4`).
3. **Merge** this pull request to complete the release.

Merging will automatically build the plugin ZIP and create a [GitHub
release](https://github.com/WordPress/sqlite-database-integration/releases).

> [!NOTE]
> This is a **pre-release**. It will not be deployed to
[WordPress.org](https://wordpress.org/plugins/sqlite-database-integration/).
@adamziel adamziel mentioned this pull request Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant