quadstorejs / quadstore

A LevelDB-backed graph database for JS runtimes (Node.js, Deno, browsers, ...) supporting SPARQL queries and the RDF/JS interface.
https://github.com/quadstorejs/quadstore
MIT License
203 stars 14 forks source link

COMUNICA: browser-side bundles are too heavy on crypto-related code #111

Closed jacoscaz closed 3 years ago

jacoscaz commented 4 years ago

As shown by the following screenshot of Webpack's bundle analyzer, browser-side bundles include a lot of crypto-related code due to @comunica/actor-abstract-bindings-hash/lib/AbstractFilterHash.js making use of the crypto module of Node.js.

By limiting the amount of hashes that can be used to just one or two we could refactor that package to depend on pure-js, npm-based implementations and get rid of almost a third of the bundle size. We could do this either by making a PR to Comunica itself (upstream) or coming up with our own replacement @comunica/the actor-abstract-bindings-hash.

Screen Shot 2020-10-23 at 22 56 08

jacoscaz commented 3 years ago

We might address this upstream with https://github.com/comunica/comunica/pull/752 (draft, WIP).

jacoscaz commented 3 years ago

Waiting on https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49123 Merged!

jacoscaz commented 3 years ago

We did end up addressing this upstream. For posterity, we started with comunica alone but ended up working across both comunica and sparqlee.

Waiting on:

jacoscaz commented 3 years ago

Released in v7.0.1-beta.2!