You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds a specialized constructor for PlotList as well as connect_plot!(scenelike, ::PlotList) to remove all the plot setup that plotlist does not make use of. I.e. the whole argument conversion pipeline, default attributes, theming, cycling, float32converts, etc. In my local benchmarks this cuts down
from around 15µs min to about 9µs min (mean ~19 to ~10)
This also makes changes to how convert_argument methods producing plotspecs are processed. In theory that should also speed things up, in practice it seems to only be marginally faster.
TODO:
check BlockSpec and GridLayoutSpec for similar improvements
see what tests say
As a side node, I noticed that plotlist! kind of but not really inherits attributes down to the plot spec plots. Specifically, it forwards what's in plot.kw, i.e. the initially given attributes. These attributes overwrite whatever the Spec sets and will always remain at their initial state. This seems wrong to me and I'd expect either:
plotlist passed no attributes whatsoever to spec plots
plotlist attributes act as defaults for spec plots (i.e. spec plots overwrite) and:
If plotlist attributes update, the next construction of spec plots should read the updated attributes
If plotlist attributes update and are used by a spec plot, the spec plot also updates
Type of change
performance improvements (non breaking?)
Checklist
Added an entry in CHANGELOG.md (for new features and breaking changes)
Added or changed relevant sections in the documentation
Added unit tests for new algorithms, conversion methods, etc.
Added reference image tests for new plotting functions, recipes, visual options, etc.
This adds a specialized constructor for PlotList as well as connect_plot!(scenelike, ::PlotList) to remove all the plot setup that plotlist does not make use of. I.e. the whole argument conversion pipeline, default attributes, theming, cycling, float32converts, etc. In my local benchmarks this cuts down
The thinking was, this needs to be done anyways, as soon as the plot is created, so we dont save much by not doing it.
What we win though is, that the types are normalized, making comparison much easier and cheaper and re-using plots much simpler.
Just consider color=:red changing to color=RGB(1, 0, 0).
As a side node, I noticed that plotlist! kind of but not really inherits attributes down to the plot spec plots.
Yeah this got tucked on when we noticed, that it has to forward attributes - but it was difficult to forward them 100% correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In reference to #5717
This adds a specialized constructor for
PlotListas well asconnect_plot!(scenelike, ::PlotList)to remove all the plot setup that plotlist does not make use of. I.e. the whole argument conversion pipeline, default attributes, theming, cycling, float32converts, etc. In my local benchmarks this cuts downfrom around 15µs min to about 9µs min (mean ~19 to ~10)
This also makes changes to how
convert_argumentmethods producing plotspecs are processed. In theory that should also speed things up, in practice it seems to only be marginally faster.TODO:
As a side node, I noticed that
plotlist!kind of but not really inherits attributes down to the plot spec plots. Specifically, it forwards what's inplot.kw, i.e. the initially given attributes. These attributes overwrite whatever the Spec sets and will always remain at their initial state. This seems wrong to me and I'd expect either:Type of change
Checklist