-
Notifications
You must be signed in to change notification settings - Fork 2
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
Streamline our codebase #9
Comments
We were only using it for the `.promisify()` method. Without it, the bundled codebase goes from 546 KB to 398 KB. Still huge.
That's the only thing we're using anyway. This lowers our codebase from 398 KB to 381 KB.
The RegExp isn't as good as what's done by URL, and we also consider "file://.*" to be a remote URL, but the code went from 378 KB to 335 KB.
When requiring the polyfill, we're polluting the global scope, and making our codebase bigger. They're not needed on many newer browsers, which might be all that our users need to support. We can't make this decision for them, so we better just document it.
This will probably be useful https://github.com/samccone/The-cost-of-transpiling-es2015-in-2016 |
Is the problem we have one of transpilation? This code was not transpiled until this latest refactor. Is there a demonstrable bloat attributable to ES6? |
Yes, but mostly because of the need for polyfills. The biggest culprits of the current size are:
A smaller CSV parsing library would go a long way... |
So we use this for client side CSV http://papaparse.com/ in most recent projects. that doesn't help with node.js though. Also if this shows us that even on a very small lib like this, that ES6 creates too much bloat, we at least learn that at least in the case of isomorphic js apps, we should stick to ES5. LMK what you think. |
The compiled code is extremely big, given how little it does. As of d4073c1, it has 570 KB (133 KB gzipped). Even after minifying with
uglifyjs --compress --mangle
, it still has 258 KB (71 KB gzipped). It includes the registry and its schemas, but it's still huge.The text was updated successfully, but these errors were encountered: