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

BUNDLE: reduce bundle size of quadstore-comunica by working on immutable.js and decimal.js #143

Closed
5 tasks done
jacoscaz opened this issue Oct 20, 2021 · 2 comments
Closed
5 tasks done

Comments

@jacoscaz
Copy link
Owner

jacoscaz commented Oct 20, 2021

There are two potential avenues that might lead to shaving significantly more bytes out of quadstore-comunica's bundle:

  1. using something other than Immutable.js and/or enabling tree-shaking so that only Immutable's Map ends up in the bundle
  2. 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 the Bindings factory function into a BindingsFactory similar to RDF/JS DataFactory, 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?
  • Align sparqlee to use @comunica/bindings-factory
  • Produce an alternative version of @comunica/bindings-factory using the hamt library or a similar alternative to Immutable.js' Map, test it within quadstore-comunica.
@jacoscaz
Copy link
Owner Author

Potential alternatives to Immutable.js' Map:

@jacoscaz
Copy link
Owner Author

Done! Will ship in the next version of quadstore-comunica.

@jacoscaz jacoscaz moved this from To do to Done in Dependencies & bundle size Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

1 participant