-
Notifications
You must be signed in to change notification settings - Fork 181
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
Remove dependencies for events logging #189
Conversation
For comparison
Not sure what the split of https vs sha.js is but for reference it looks like mapbox-sdk-js and mapbox-gl-js both use XMLHttpRequest without any overhead. https://github.com/mapbox/mapbox-sdk-js/blob/master/lib/browser/browser-layer.js Wondering if it's worth doing the same here. |
Using XMLHttpRequest, the min.js file size is now 75132 bytes. |
* @private | ||
*/ | ||
shouldEnableLogging: function (options) { | ||
if (this.origin.indexOf('api.mapbox.com') == -1) return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would ===
bet safer? It's what's used at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf#Checking_occurrences
@scottsfarley93 Thanks for fixing these things up. I wanted to make some comments about the project/development in general. It's not for me to dictate how things are done, but I've been finding it hard to keep tabs on development and maintenance of this project. I'd prefer if we could: 1.Try to keep each PR contained to one issue, it's easier to review and keep track of where changes are being made.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, thanks for improving this. I haven't done any testing though.
@andrewharvey thanks for the review and the contribution feedback. Quick question there -- I'm not sure I follow the order of operations on the deployment instructions. Based on your suggestion, I think the following order makes the most sense, but wanted to double check:
Let me know what you're thinking there. I can update the docs accordingly once we've nailed down the steps. |
@scottsfarley93 That's right, I find that approach, forcing releases to have their own commits rather than doing a release together with other commits, a lot clearer and better practice and what has historically been happening. #198 clarifies that. |
In response to #188, this PR investigates the increase in bundle size introduced in #183 and attempts to reduce the increase by changing the dependencies used in logging interaction events.