-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Why is heatmap rendering 5x faster with zsmooth=best than with zsmooth=false? #6521
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
Comments
Out of curiosity, does one of the main developers have an idea about this? @archmoj @hannahker @alexcjohnson If you have some guidance about where to look, I can also have a deeper look. Thanks in advance! |
You can look over here, there should be a way to make this loop way faster, or at least as fast as the zmooth loops. |
Thanks @lvlte. Two little questions:
What kind of smoothing is there in the Also it seems |
Hi @josephernest,
In fact I'm just getting back into the code and I think I've found a fix, though I need to do some more testing before proposing a PR to be sure I'm not introducing another bug.. In the meantime, I will provide a workaround on SO so that you can still solve the performance issue until a PR is merged. I also came across the "truncated heatmap" bug with |
Thanks @lvlte!
Waw this is great!
Thanks again this will be super helpful! |
@lvlte Out of curiosity, would you have any news about this? |
Yeah so I have procrastinated long enough ! Here is the PR that deals with the zsmooth="fast" rendering bug. It is mandatory to have this fixed before optimizing the rendering of heatmaps with no smoothing (because it will use the same trick as for the zsmooth="fast"), I'm not sure it's clear but anyway I will let you know. |
Thanks @lvlte! I have tested with https://output.circle-artifacts.com/output/job/0fcb57ef-9b72-4d3c-9f71-ec5b4c157645/artifacts/0/dist/plotly.min.js and it seems to work great for Are there things to test (I can have a look if you need another pair of eyes :)) ? |
In fact I just realized the test-baselines failed, but I'm not sure to understand what should be done, so if you get to know why it fails and what I missed don't hesitate ! |
Congrats for the solution and the merge @lvlte :-) This is now in release 2.21.0 :) Now I think we can emulate zsmooth=false (which is slow) by using zsmooth=fast and |
Exactly, you can now use the workaround w/o the bug :) I'm gonna submit a 2nd PR soon, it will make the code handle this under the hood whenever possible (there are cases where it's not possible though). |
Wonderful @lvlte! |
Rendering a
heatmap
withzsmooth=best
(demo here) is rendering at ~ 5fps for me.This is 5 times faster than with
zsmooth=false
(only 1 fps for me, demo here), which seems unlogical.Doing an interpolation should make it slower, not faster. Is there a bug that makes it slower when doing no interpolation?
This shows that
zsmooth=false
heatmap rendering could probably be improved a lot.Any idea about this?
The text was updated successfully, but these errors were encountered: