Skip to content

Reduce retained memory in compiled filters - #211

Merged
marmeladema merged 1 commit into
masterfrom
elie/reduce-compiled-filter-memory
Nov 16, 2026
Merged

marmeladema merged 1 commit into
masterfrom
elie/reduce-compiled-filter-memory

Conversation

@marmeladema

Copy link
Copy Markdown
Collaborator

Compiled filters retain some AST representation details that are unnecessary during execution. Extract the memory reductions from #210 independently of its field-access changes and extend them to similar cases:

  • Retain regex and wildcard matchers without their source representations.
  • Discard byte-literal formatting and specialize scalar function literal captures.
  • Trim terminal wildcard paths during compilation, removing redundant offsets.
  • Store range endpoints without iterator state.
  • Forward single-element logical combinations and store binary children inline.

Preserve matching behavior, literal ownership, compiler hooks, scalar short-circuiting, and vector truncation.

@marmeladema
marmeladema force-pushed the elie/reduce-compiled-filter-memory branch 3 times, most recently from 51a8e71 to 41a422f Compare November 16, 2026 10:50
@marmeladema
marmeladema force-pushed the elie/reduce-compiled-filter-memory branch 2 times, most recently from b7cbf77 to ce3cd0a Compare November 16, 2026 11:05
Discard regex and wildcard source representations and byte literal formatting
when compiling filters. Capture scalar function literals without enum tags,
trim terminal wildcard paths, and store range endpoints without iterator state.

Forward single-child logical combinations and retain binary children inline
to avoid unnecessary closures and child-slice allocations. Preserve scalar
short-circuiting, vector truncation, and existing compiler hooks.
@marmeladema
marmeladema force-pushed the elie/reduce-compiled-filter-memory branch from ce3cd0a to 1e7e663 Compare November 16, 2026 11:07
@marmeladema
marmeladema merged commit 80676ca into master Nov 16, 2026
10 checks passed
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.

2 participants