Skip to content
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

[FR] Use Preferences.jl to configure default loaded backend #4513

Closed
mkitti opened this issue Nov 12, 2022 · 4 comments · Fixed by #4566
Closed

[FR] Use Preferences.jl to configure default loaded backend #4513

mkitti opened this issue Nov 12, 2022 · 4 comments · Fixed by #4566
Assignees
Labels
2.0 discussion enhancement improving existing functionality extension new behaviour performance speedups and slowdowns priority ttfp

Comments

@mkitti
Copy link
Contributor

mkitti commented Nov 12, 2022

Loading GR by default can cause issues since it loads so many other packages, notably JLLs.

For example, loading QT via GR can result in the PyPlot backend not working:
https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/32?u=mkitti

To simplify this, let's provide a Preferences.jl mechanism so that users can load their preferred backend by default. This will also help to minimize issues and accelerate plots by not loading unnecessary packages that we are not using.

@t-bltg t-bltg added enhancement improving existing functionality discussion extension new behaviour labels Nov 13, 2022
@mkitti
Copy link
Contributor Author

mkitti commented Nov 13, 2022

@t-bltg
Copy link
Member

t-bltg commented Nov 24, 2022

This will also also improve ttfp for the chosen default backend.
If a user only uses a declared backend, we should precompile examples for that backend.

@t-bltg t-bltg added performance speedups and slowdowns ttfp labels Nov 24, 2022
@mkitti
Copy link
Contributor Author

mkitti commented Nov 24, 2022

My main goal here is compatibility and usability. We're loading a lot of libraries with some of these plotting packages.

Performance is a secondary goal, but a worthy one to consider. Perhaps besides just indicating the default backend, we also indicate which backends to load by default in general?

@t-bltg
Copy link
Member

t-bltg commented Nov 24, 2022

This is going to be a tough one, because of the constraints of module initialization in __init__, precompilation using SnoopPrecompile and the way we load backends (currently using @eval and @require) in Plots ...

I tried some things, but going nowhere atm.

@t-bltg t-bltg self-assigned this Nov 28, 2022
@t-bltg t-bltg added the 2.0 label Nov 28, 2022
@isentropic isentropic mentioned this issue Jan 12, 2024
37 tasks
@BeastyBlacksmith BeastyBlacksmith mentioned this issue Mar 12, 2024
29 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 discussion enhancement improving existing functionality extension new behaviour performance speedups and slowdowns priority ttfp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants