-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Performance Degradation With Multiple "each" #1070
Comments
Yes, the speed should improve somewhat over time. It will still be slower, but we hope to improve on the performance to the point where it is acceptable for development. It is still worth noting that the latest update is a performance improvement in production environments where jade templates are compiled ahead of time. |
yikes I thought esprima was reasonably fast, that's definitely not ok for development if it's that slow |
Esprima is fast, lexical-scope is not, and with relies on lexical-scope. |
Looking at nodetime reports of compiling a pathological template it looks like the lions share of the time is spent in this function |
wtf.. that code makes no sense to me, quite the mess, good thing he comments nothing |
substack's not well-known for code cleanliness :( |
im sure we could do something that makes a lot more sense for "with", not hard to walk the ast and prefix pseudo "globals", seems like this thing does a bunch of other unrelated confusing things |
Personally I think substack's code is fine. Could use a few comments but otherwise it's fairly sensible. The issue is that starting from esprima's output requires quite a lot of work. UglifyJS already does so much of this computation in order to mangle variable names so getting from that output to a list of globals is completely trivial and much faster. |
Possibly related to #1064
Having updated Jade to 0.31.2, I've noticed that certain pages (usually involving multiple each statements) take significantly longer to compile - in one case, the time jumped from 71ms (for Jade v 0.30.0) to 5100ms. I suppose I could rewrite some server side code in order to provide jade with fewer each statements if necessary. Should I expect this performance drop moving forward?
The text was updated successfully, but these errors were encountered: