This repository has been archived by the owner on Mar 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 513
Conversation
This file contains 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
Wow ;-D |
👏 |
😮 |
LGTM. Great work. What did you use to profile the code? |
I used node-tick-processor. |
Landed! Thanks again @efolio. |
Ahhh performance, thats one detail I didn't speed attention when I wrote this code a week ago. Perhaps, monitoring the performance is something we could look into in the future... So thanks @efolio for fixing my code :-) |
You're welcome :) |
For future reference, regenerate is supposed to be used as part of a build script, not at runtime! |
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Hi,
Having big performance issues by only creating a tiny gulp task, I decided to investigate.
My example:
The content of index.js (yes, it is a very big file):
… so nothing out of the ordinary.
I time the execution. The result: 3s on my desktop machine… WTF?! O_O
So I profile the process to see what is going on. I stumble on this:
etc…
1056 ticks on the library:
regenerate
!58.3% of total user execution!
As I look into the only 2 rules using
regenerate
, maybe my understanding is wrong, but it seems thatregenerate
is unnecessary as the proper regexp are shipped along withunicode
…The fun thing? This tiny little patch improves the overall performance of JSCS by a factor > 200 :)