-
Notifications
You must be signed in to change notification settings - Fork 80
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
Refactor GeoPackage-JS lib with minimal dependencies to make it reusable #135
Comments
+1 I tried using this library in a client application the other month, and have seen it as unsuitable for use in JS client apps due to its size. At 19.2MB size of this library is much larger than others and causes Parcel (a popular bundling/tree-shaking tool in the JS ecosystem) to crash when building with default settings. |
I am fully on board with this. If anyone would like to take this task on and submit a pull request that would be great. |
I think it would be first necessary to think about how to refactor and/or split up the library. Perhaps along functionality:
Or along dependencies:
Or app requirements:
|
Looking the published example, In the loaders.gl project, we've reimplemented a minimal GeoPackage parser from scratch. We've only implemented reading of vector data, so it doesn't handle every edge case, but the JS part is 43KB minified and gzipped (including proj4.js), plus the sql.js wasm bundle, which is 333KB brotli compressed. That's 91% smaller than geopackage-js, so it might be a good reference for some people on this thread. Happy to share details or any other info if it would help. |
That sounds like a good alternative for people with minimal needs. We are currently in the process of releasing a new version which should decrease the package size and I will report back to this thread when we are done. While library size is important, this library is meant to be a full and complete implementation of the entire spec and thus, library size does tend to increase due to that. Once again, I will report back on any library size improvements when we release the new version. |
This is a feature proposal: Refactor GeoPackage lib with minimal dependencies to make it reusable in other JS code. That would help other projects and widen the community of this nice GeoPackage-JS project.
The text was updated successfully, but these errors were encountered: