Closed millermedeiros closed 11 years ago
I just released rocambole v0.2.3 which improves performance A LOT! now it is able to format jQuery in under 4s (could still be improved).
opts : 2ms
indent : 2ms
trail : 1ms
empty : 0ms
parse : 3154ms
sanitize : 9ms
moonwalk : 603ms
toString : 21ms
TOTAL : 3796ms
~95x faster! :+1:
will close this bug for now and maybe improve rocambole even more in the future.
did a "quick" (not as quick as I expected) test using jQuery 1.8.3 and it takes forever to process the file.
half of the reason is because rocambole is too slow (see millermedeiros/rocambole#4), the other half of the time is spend on
sanitizeWhiteSpaces
and executing the hooks for each node.I added a few
console.time
andconsole.timeEnd
calls, here is the output:Still need to profile it better (only did the
console.time
so far) but I know I'm doing a lot of unnecessary work (lots of function calls and removing/inserting unnecessary tokens).I hope to bring the total time below 5 seconds (ideally under 3s), lets see how it goes.
PS: I will probably "finish" the support for all statements before working on the performance.