Skip to content
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

Issue 522: Linear comment attachment algorithm #238

Closed

Conversation

ikarienator
Copy link
Contributor

Issue 522: Linear comment attachment algorithm

Linear comment attachment to replace the quadratic comment attachment algorithm.

Before:

Source Size(KiB) Time(ms)
Underscore 1.5.2 42.50 31.30
Backbone 1.1.0 58.70 60.02
MooTools 1.4.5 156.70 211.06
jQuery 1.9.1 262.10 1461.83
YUI 3.12.0 330.40 759.88
jQuery.Mobile 1.4.2 442.20 3713.60
Angular 1.2.5 701.70 1175.43
Total 1,994.30 7,413.12

After:

Source Size(KiB) Time(ms)
Underscore 1.5.2 42.5 5.34
Backbone 1.1.0 58.7 5.81
MooTools 1.4.5 156.7 25.69
jQuery 1.9.1 262.1 69.75
YUI 3.12.0 330.4 50.95
jQuery.Mobile 1.4.2 442.2 118.27
Angular 1.2.5 701.7 93.07
Total 1994.3 368.88

Speed up: 20.1x

Note that this is only 1.8x slower than without comment attachment, which is exactly the performance without comment attachment a week ago before the series of optimizations.

@ikarienator ikarienator changed the title Linear comment attachment Linear comment attachment algorithm Apr 2, 2014
Issue 522: Linear comment attachment algorithm
@ikarienator ikarienator changed the title Linear comment attachment algorithm Issue 522: Linear comment attachment algorithm Apr 2, 2014
@ariya
Copy link
Contributor

ariya commented Apr 3, 2014

Merged, thanks!

@ariya ariya closed this Apr 3, 2014
@ikarienator ikarienator deleted the linear-comment-attachment branch April 3, 2014 04:14
@nzakas
Copy link
Contributor

nzakas commented Apr 13, 2014

Any chance of getting a patch version pushed to npm with this fix? ESLint would love to use this now that the perf issues have been addressed. :)

@ariya
Copy link
Contributor

ariya commented Apr 13, 2014

Slated for 1.2.

@nzakas
Copy link
Contributor

nzakas commented Apr 13, 2014

Cool. Is there a timeframe for 1.2? Just trying to plan accordingly. Thanks.

@ariya
Copy link
Contributor

ariya commented Apr 14, 2014

Hopefully weeks timeline, check https://code.google.com/p/esprima/issues/detail?id=514.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants