fix(utils): remove lookbehind regexp for better performance - #6236
Merged
Conversation
Contributor
|
@christian-bromann - I wonder if you should add a test - similar to this one https://github.com/stenciljs/core/blob/main/test/wdio/ssr-hydration/cmp.test.tsx#L196 To measure SSR render performance time with a large stylesheet? |
Member
Author
|
@johnjenkins added a test for the update. With the original code the time for executing the function has been stable around 2s, now with the patch it is between 3-5ms. |
3 tasks
hshandilya-cloudflare
added a commit
to hshandilya-cloudflare/realtimekit-ui
that referenced
this pull request
Jul 30, 2026
Pull in stenciljs/core#6236 to fix StencilJS generating regular expressions that fail on Safari 16
hshandilya-cloudflare
added a commit
to hshandilya-cloudflare/realtimekit-ui
that referenced
this pull request
Jul 30, 2026
Pull in stenciljs/core#6236 to fix StencilJS generating regular expressions that fail on Safari 16
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.
What is the current behavior?
We have been using a negative look-ahead regexp which turned out to be extremely slow for hydrating components on the fly. This patch optimises the Regexp to be more performant.
GitHub Issue Number: #6226
Documentation
n/a
Does this introduce a breaking change?
Testing
We have extensive unit tests in place for this function.
Other information
n/a