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

Defer loading of wasm file #64

Closed
fregante opened this issue Apr 16, 2021 · 1 comment
Closed

Defer loading of wasm file #64

fregante opened this issue Apr 16, 2021 · 1 comment

Comments

@fregante
Copy link
Member

If you use the import() function the website will be usable earlier (e.g. it can start resolving the graph) while it downloads this huge dependency.

docs/graphvizlib.d416b260.wasm      ⚠️  1 MB
docs/index.80c6c8bb.js                  368.92 KB   
@broofa
Copy link
Collaborator

broofa commented Apr 17, 2021

Good point.

FWIW, this was the most problematic part of switching to Parcel. I ended up removing d3-graphviz because it relied on @hpcc/wasm's default behavior for loading the WASM file, which wasn't working with parcel bundling. Not a big surprise that, I suppose. Switching to import() shouldn't be a big deal as long as parcel groks what's going on there.

@broofa broofa closed this as completed in a748976 Apr 29, 2021
broofa added a commit that referenced this issue Apr 29, 2021
fix: improved graph rendering logic, fixes #64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants