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

Remove Blink dependency #451

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

halleysfifthinc
Copy link

@halleysfifthinc halleysfifthinc commented Oct 31, 2022

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)

@@ -15,9 +14,6 @@ end

function Base.show(io::IO, mm::MIME"text/html", p::SyncPlot)
# if we are rendering docs -- short circuit and display html
if get_renderer() == DOCS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this function is used when generating the Documenter pages (not for Blink per se).

@jd-foster
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revisit removal of Blink as a dependency
2 participants