BUNDLE: reduce bundle size of quadstore-comunica by working on immutable.js and decimal.js
jacoscaz opened this issue · comments
There are two potential avenues that might lead to shaving significantly more bytes out of quadstore-comunica
's bundle:
- using something other than Immutable.js and/or enabling tree-shaking so that only Immutable's
Map
ends up in the bundle - using one of the alternatives to decimal.js
Both of these require upstream work.
Number 1. in particular is a bit more complex as the Bindings
type and factory function are declared separately in both comunica/comunica and comunica/sparqlee.
Plan and relevant PRs / commits:
- swap decimal.js with a lighter alternative
- move
Bindings
typings declaration from@comunica/bus-query-operation
to@comunica/types
and refactor theBindings
factory function into aBindingsFactory
similar to RDF/JSDataFactory
, moving it to a dedicated package@comunica/bindings-factory
. - Align
@comunica/bindings-factory
with the Queryable RDF/JS spec- Should the typings for the Queryable RDF/JS spec end up in
@rdfjs/types
?
- Should the typings for the Queryable RDF/JS spec end up in
- Align
sparqlee
to use@comunica/bindings-factory
- Produce an alternative version of
@comunica/bindings-factory
using thehamt
library or a similar alternative to Immutable.js'Map
, test it withinquadstore-comunica
.
Potential alternatives to Immutable.js' Map
:
Done! Will ship in the next version of quadstore-comunica
.