-
Notifications
You must be signed in to change notification settings - Fork 19
add regex precompilation to build step #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add regex precompilation to build step #361
Conversation
Signed-off-by: Karthik Ganeshram <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with this approach is that it will make debugging impossible, unfortunately. I think it's okay to land for now, but we'll have to restructure it pretty substantially before too long.
What I imagine we'll end up doing is along the lines of
- instead of relying on bundles, support walking all imports and looking for regexs in all of them
- then, instead of overwriting regex occurrences in the source, we collect them and write compilation steps for them into a new file
- finally, we pass a new file as input to componentize that imports the original main file and this generated file
I think that should make everything work, keep source maps intact, etc.
But for now, let's land this so we get the speedup :)
@@ -36,7 +35,7 @@ echo "\n\nTest completed" | |||
|
|||
# kill the spin app | |||
echo "Stopping Spin" | |||
kill -9 $SPIN_PID | |||
killall spin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can keep this to the specific process by changing from kill -9
to kill -6
. Can you test that and see if it works? I had this result in very unexpected behavior before, and am certain that we (and others) would run into it again in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This did not work, I can take a look at how to fix this in a separate PR.
@tschneidereit Do we want to optionally enable the regex stuff, so that if debugging is enabled, we can ignore the precompile step for the time being? Is that an acceptable tradeoff? |
oh, that's a great idea! Let's maybe tie it to the |
The only downside is that we will not be able to compile applications that have unicode regex in debug, but I am okay with the tradeoff. |
Yeah, we could do that, and it might be nicer for the time being |
Signed-off-by: Karthik Ganeshram <[email protected]>
Signed-off-by: Karthik Ganeshram <[email protected]>
alternatively, we could write the precompiled source to a file and keep the new syntax. @tschneidereit Do you have a preference.