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

+1MB of JS - the unpleasant effect of anonymous event tracking #188

Closed
jimutt opened this issue Feb 26, 2019 · 3 comments
Closed

+1MB of JS - the unpleasant effect of anonymous event tracking #188

jimutt opened this issue Feb 26, 2019 · 3 comments
Assignees

Comments

@jimutt
Copy link

jimutt commented Feb 26, 2019

Hi!
I recently discovered that the 3.1.2 release (https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v3.1.2/mapbox-gl-geocoder.min.js) has a size of over 1MB. Compared to the modestly sized 3.1.1 release at 36k: https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v3.1.1/mapbox-gl-geocoder.min.js

I believe it maybe was an unfortunate mistake to include dependencies (Without any investigation I guess the request and crypto packages are the main cause) inducing this huge increase in size.

@andrewharvey
Copy link
Collaborator

wow good catch @jimutt.

It does indeed appear to be due to dependencies introduced in #183, @scottsfarley93 hope you're able to take a look.

@scottsfarley93
Copy link

Interesting. I can take a look at this later this week.

@scottsfarley93
Copy link

After removing dependencies, the js bundle is now 75.148kb. It is available in v3.1.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants