ENH: load plotting entry point only when necessary #41492
Labels
Compat
pandas objects compatability with Numpy or Python functions
Enhancement
Performance
Memory or execution speed performance
Visualization
plotting
Milestone
Is your feature request related to a problem?
All installed plotting backends are loaded on the first
DataFrame.plot
call of a kernel, resulting in a potentially unnecessary module loading time, although quite minor, as it's only done on the very first call. However, if the number of pluggable backends out there increases in the future, this could become a real nuisance for users who installed many of them in their environment.Describe the solution you'd like
In
pandas.plotting._core._find_backend
,entry_point.load()
should only be done for the solicited backend. This is straightforward to implement, I could write the PR myself.API breaking implications
None as far as I know.
Describe alternatives you've considered
Additional context
With just hvPlot installed, the following
takes ~2s , while
takes a few ms. As one would expect,
entry_point.load()
is the slowest part to execute by far.The text was updated successfully, but these errors were encountered: