support regex based filtering#26
Open
nvdk wants to merge 12 commits into
Open
Conversation
this greatly reduces the size of delta messages in stacks with large data changes.
this tries to optimize filtering and match detection in two ways: - by grouping on match pattern: this means we only do detection and filtering once for a given match pattern (takes the pattern and sendMatchesOnly into account) - by doing matching before origin filter, since the latter seems more costly
this is not the prettiest of solutions, but it does achieve the same thing. bonus is it only happens once on startup
it's mentioned in the expressjs best practices (and elsewhere) that process.env should be used sparingly: | If you need to write environment-specific code, you can check the value of NODE_ENV with process.env.NODE_ENV. Be aware that checking the value of any environment variable incurs a performance penalty, and so should be done sparingly. https://expressjs.com/th/advanced/best-practice-performance.html#set-node_env-to-production it seems this is because process.env is a getter that processes the ENV array each time
- avoid recalculating changedTriples in every loop - if sendMatchesOnly is true, a changeset might be empty. Do not send a changeset in this case - don't redo checking matches if this was already done because of `sendMatchesOnly`
madnificent
added a commit
that referenced
this pull request
Dec 22, 2025
We probably want to have some structure to better filter out quads and better filter out information sent to consumers (also see #26). This experiment allows dropping the access rights used in the request's header. It doesn't allow dropping the mu-session-id though doing so could allow for more involved folding and we see no reason not allow this too. The mu-auth-allowed-groups are still persisted in the delta body. It's not documented to be available there so we could remove it there too. A function can be specified to alter the access rights.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This extends the optimized filtering PR (#21) with support for regex matching. Mostly opening the PR here for awareness. This can be combined with #24 if you need multiple matches for a give rule.