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

mermaid.js uses 70% of transfer bandwidth #110

Open
cstaky opened this issue Mar 3, 2025 · 0 comments
Open

mermaid.js uses 70% of transfer bandwidth #110

cstaky opened this issue Mar 3, 2025 · 0 comments

Comments

@cstaky
Copy link
Contributor

cstaky commented Mar 3, 2025

I noticed that on slow connections the theme takes a bit of time to actually show up on a site (up to 5 seconds on a really slow 4G signal). This seemed strange since the theme looks pretty lightweight. Having a look in the Firefox network monitor brought this up:

Image

A 3 MB javascript file in static/ gets loaded on every page that you go on, regardless of whether there is even Mermaid content on that specific page. Granted, it does get cached after the initial GET request, but 3 MB is still a large size for a single js file in static/. Surely there has to be a better way to serve it?, and only on pages were it is required.

Running the demo website (https://not-matthias.github.io/apollo) through some random website analyser confirms the performance issue.

Image

link

cc @rupert648, since you merged this in #82

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

No branches or pull requests

1 participant