-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Speed up get_clims
#3839
Speed up get_clims
#3839
Conversation
And with this change, the profiler shows the ~10% of the time is spent doing type inference, and the rest of the time drawing the shapes. |
Codecov Report
@@ Coverage Diff @@
## master #3839 +/- ##
==========================================
- Coverage 63.23% 63.15% -0.09%
==========================================
Files 28 28
Lines 7491 7491
==========================================
- Hits 4737 4731 -6
- Misses 2754 2760 +6
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Do I understand it right that when you animate the plots, the clims are no longer calculated again? |
Is there a chance that when animating, the clims would not reflect the right color if the animation would change the colorrange |
This is my understanding:
|
so something is different between |
Thanks for the example, I'll check it out. |
bcc1d2f
to
abc8510
Compare
I'm having trouble figuring out where the right place would be to update a stored clim value. args.jl has There's also |
Just to get it to work, I stuck it at the end of the pipeline. So now it:
|
I just noticed there's already a EDIT: Ah, that's so the user can define their own, but if color values show up beyond that range, it'll be expanded. Any reason to not just overwrite |
Alright, I understand this all better now.
These changes mean I had to add an update call in the aforementioned dynamic callback to handle a following call like |
@BioTurboNick thanks for the investigation on that matter. Is the PR ready ? |
Ready for review, yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#3839 (comment) looks ok: png
, svg
and gui
.
I trust you on the performance improvement 😉.
Thanks! The remaining issue is just where the update calls are coming from. I just changed it to call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works well as far as I can see. If you resolve conflicts, I'll merge this.
Thanks a lot!
Finally resolves #3837 , I think. (That was faster than I thought!)
This change stores the color limits as a property of the subplot, which it looks up instead of iterating over all series again.
Since it's switching from a dynamic lookup to a stored value though, need to pay attention to when else it needs to be explicitly updated. E.g. if
fill_z
or related is changed that would affect existing series. Right?