-
-
Notifications
You must be signed in to change notification settings - Fork 388
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 Chart.js 3 benchmark #65
Conversation
i couldn't get this commit working (console errors). but i locally compiled your Chart.js.html
Chart.js3.html
great strides! |
@leeoniya my |
@leeoniya was there anything else you wanted to do before merging this? Also, let me know if you have suggestions on the file name. It seemed a little funny to me, but I couldn't think of anything better |
no, this looks fine. i'll merge it when i have a bit more time for re-benching. i'm working on some uPlot API stuff that's higher in the queue. i see you may have more perf-related stuff coming up anyways: chartjs/Chart.js#6822 |
@benmccann i should add that i would be hesitant to merge an implementation that comes with a bunch of caveats and disabled features, specifically made to move up in the bench tables. the fact that the fastline controller excludes datapoint rendering is not a good sign - what if i zoom in on a region that's sparse enough to show datapoints, am i SOL if i chose this controller originally? is spanGaps handling also gutted? i realize i'm judging the featureset from a biased point of view, but i don't want implementors carving out modes in their libs just so they can say "look, we can do a curating benchmarks is hard. |
Sure, that makes sense. Just to clarify, all the work I'm doing on improving performance is motivated primarily by my own use case. And this PR doesn't use the I'm not entirely sure yet whether The main performance benefit of |
the current non-minified version [1] works fine, but the minified version [2] gives me this: [1] https://www.chartjs.org/dist/master/Chart.js |
Hmm. I don't get that. I did "Ctrl + F5" to try to clear the cache and it still worked for me. Can you try that to see if maybe it was just a problem with an old version? |
what kind of dev do you take me for? 🤣 here's a fresh copy/pasta that fails for me: https://jsfiddle.net/80wabtvx/ Chrome Version 79.0.3945.79 (Official Build) (64-bit) it also breaks in Firefox. |
fails on my phone too. maybe it's a cdn issue. can u attach the version u're getting? or content hash. |
passes on my phone :-) here's the file my browser's loading (I had to append |
yes, it looks like a CDN issue. we're not getting the same versions. i'm at home now (was in cafe before) and still have issues in both browsers. here's what i get served: Chart.min.js.txt. mine is coming from |
so, any thoughts on how to move forward here? (it's still failing for me, btw). |
Hmm. I wonder if you try on ipv4 if it will work? @etimberg @kurkle do you guys know how https://chartjs.org/dist/master/Chart.min.js is hosted and deployed to Cloudflare? Is there anything you guys can think of to make sure the latest version is deployed and caching is disabled? |
it might, but that's irrelevant unless you can force all users of that link to disable ipv6. edit: unless this can be disabled at the CDN level. i can try it sometime soon (i'm not sure if everywhere i tested it was over ipv6). |
Yeah, I'm still trying to figure out what would cause that, so just looking for any useful clues |
same issue on ipv4: 104.17.33.53:443 |
We didn't enable cloudflare, that must be something GitHub is doing for pages. When I test, I get IP: 104.17.32.53:443 |
It's in the chartjs.org DNS settings, so I think we did configure it. I'll email @nnnick and see if there's anything he can do to help |
@leeoniya can you try again? I think this might be fixed now. Response I got from Nick:
|
yep, that did it. |
Woohoo! |
i'll re-bench this soon on Chrome 79. meanwhile, Chrome just keeps getting slower and slower: krausest/js-framework-benchmark#683 |
current numbers:
|
Cool! Is there anything else you wanted to do before merging this PR now that we have the new benchmark? Thanks for all your help on this one! It was tricky to figure out that Cloudflare issue! |
i'm gonna pillage my markdown table builder from domvm [1] and maintain the benchmarks in a JSON file. i like the denser style of the non-html table (i need more columns) and formatting that manually is gonna get old quickly. [1] https://github.com/domvm/domvm/blob/master/build.js#L234-L292 |
note to self: still need to link the benches from the new table & re-check lib sizes. |
cool. i'm curious what's the difference between |
the ordering in the chart is based subjectively on speed from "Rendering..." to the chart paint. Flot and dygraphs needed quite a few iterations to definitively place them - they're really close even though you can't tell that just from |
Thanks for the detailed explanation! It's funny to me that "done" for Flot is greater than "js". I'd expect "js" to always be larger since it includes more. I probably would have chosen to order on the "js" column since data prep is normally done on the server side in my experience |
well, you can't exactly do data prep server-side for libs that need native
in theory, i was considering ordering everything by also, i updated the lib sizes and you guys put on some weight: 239 -> 247, but i don't recall 8k worth of features landing 🤷♂ . |
Yeah, if anything I thought we deleted code. We added babble, so that could be part of it. I'll have to finish the buble PR. I'm surprised it's that big though because it was showing as only 174k in that PR for me: chartjs/Chart.js#6836 |
i'm including all deps required to run the bench (besides what's inlined in the html) - so, |
It'd be cool to get this on the README if you're willing so we can see how we stack up