PlotlyJS.jl icon indicating copy to clipboard operation
PlotlyJS.jl copied to clipboard

Remove Blink dependency

Open halleysfifthinc opened this issue 1 year ago • 1 comments

Disclaimer: This PR is not-entirely-serious, and is mostly intended to start a discussion.

Blink is a large dependency with a correspondingly large load time (@time using Blink # 2.42 seconds on my PC).

There are two major benefits from removing Blink as a dependency:

  • Faster load times.
    • @time using PlotlyJS drops from 3.12 to 1.02 seconds, with matching decreases in number of allocations and total allocated memory.
  • Reduced direct and transitive dependencies.
    • In particular, without Blink, there is no transitive dependency on WebSockets, which is incompatible with new(er) versions of HTTP > v1. The presence of WebSockets in the environment downgrades HTTP and any packages/versions depending on recent versions of HTTP, which is particularly inconvenient in large environments (which despite recommendations to the contrary, are the norm from what I can tell).

Some relevant questions:

  • How many users depend on the Blink functionality vs using Jupyter?
  • Do the number of Blink users justify a 3x loading time?
  • Could we split this out into a separate package?

(Fixes #272)

halleysfifthinc avatar Oct 31 '22 17:10 halleysfifthinc

There could be an argument here for a weak dependency version too as in #463 .

jd-foster avatar Nov 03 '23 07:11 jd-foster