-
Notifications
You must be signed in to change notification settings - Fork 2.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
Fix calcTicksY formatting #2144
Conversation
I took the liberty of running a quick test on my macbook pro on chrome.
For 100 series with 1 million points each (which is worst case granted), it takes about 12 seconds to loop through all the values.. and that's even without the extra function call overhead. Cutting it down the a more standard size (100 points on 20 series) still takes about 2 seconds:
I'm not seeing this as very efficient. If you can come up with a better way then that's fine, but otherwise I think I may need to revert your PR... @ovvn @jeznag |
@liquidpele sure, you may revert the PR. The test isn't accurate though. We discussed
But all such tests are artificial. In reality nvd3 will do poorly when rendering a dataset if its length just hits something like 5000. In my experience every time I need to draw something that has thousands of elements then I would use a pure d3. |
Sorry, but maybe I don't see how my test was wrong... you have nested for loops in your solution so I copied that. I do understand that there are some performance issues with nvd3 and many points, but that's all the more reason to not ADD to that issue... especially for something so trivial as deciding how many ticks to use. |
Yes, it's nested, but as we discussed due to the discrete bar chart's dataset structure (1xN matrix) it is really just one
Ok, let's pretend that we extended the functionality for other chart types where dataset's structure is NxN array. In this case we indeed get a
Conclusion: |
okay fair enough. I'll leave it and someone can come up with something better if it's a problem. |
No description provided.