-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Request: Leverage package extensions #331
Comments
I'd like to correct a few things here:
I find it rather cumbersome to request from a user to load That being said, we can support package extensions for the single UnicodePlots.jl/src/UnicodePlots.jl Line 126 in c7f2f95
julia enhances). We could maybe wait for the next LTS and support only julia versions with package extensions thus dropping the Requires usage at this precise moment.
We can maybe make the EDIT: I finally went ahead and added |
See JuliaGraphics/ColorVectorSpace.jl#186 for the proposal to make |
From #324 StaticArrays and Unitful seem to take a long time. But Unitful seems to be fairly isolated, might also be a good candidate? UnicodePlots.jl/src/interface/lineplot.jl Lines 188 to 190 in c7f2f95
|
I knew this felt like déjà vu: #222 (comment) ;)
It's actually used in two other places: Lines 386 to 388 in e221cee
and UnicodePlots.jl/src/interface/scatterplot.jl Lines 137 to 163 in e221cee
As you said this is a good candidate too. You likely have EDIT: implemented |
Sorry! I searched but clearly not everywhere... #332 looks great. |
it is used, but do we need to use it? like, are people plotting into text-based terminal in a loop? for the 1+ seconds of load time caused by StaticArrays.jl, we can probably create and rotate 100 times and not all plots need rotational matrix I'm guessing |
While implementing 3d plots, I didn't take loading time into account and thought using static matrices was a good idea (using the assumption that people use a lot StaticArrays so it would already be loaded). So I didn't benchmark using regular matrices vs StaticArrays ones. I can imagine the case where you plot the 3d results from a pde evolving in time thus using a fixed model-view-projection matrix. I can also imagine rotating stuff (azimuth and elevation) and generating a gif out of it (changing MVP matrix), so there are multiple use cases here. I'm all in favour of removing the StaticArrays dependency for 3d plots if the performance impact is negligible (a few percents would be acceptable). I'm marking this on my Todo list (we need a plausible real case usage benchmark). An alternative would be to adapt the code using weak deps as well for StaticArrays (and have a fallback version using regular matrices), but I'm not sure this is feasible. I've opened #335 to track the |
In the upcoming Julia 1.9, dependencies can be added as optional, such that they are only loaded if a set of other packages are also loaded in the same session.
UnicodePlots is quite dependency-heavy (see #291), leading to high latency (see #324) but the deps can't just be removed as this would remove features in some cases.
Using package extensions could significantly improve loading times and latency for the large majority of users, while still providing the features needed by the minority.
Package extensions are non-breaking on earlier Julia versions.
The text was updated successfully, but these errors were encountered: