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

ibm-cos-sdk is huge on the client side #20

Closed
dglozic opened this issue Mar 3, 2018 · 12 comments
Closed

ibm-cos-sdk is huge on the client side #20

dglozic opened this issue Mar 3, 2018 · 12 comments

Comments

@dglozic
Copy link

dglozic commented Mar 3, 2018

Why is this library so big? When I analyze it in WebPack memory analyzer, it ends up being 1.2MB before compression (366kB after compression). This is huge in comparison to AWS S3 SDK that clocks at only 283kB (70kB after compression).

AWS S3 SDK is obviously optimized so that it can be used on the client side code through WebPack/commonJS. Can you review your dependencies and see if you really need all of them. As it stands now, IBM COS SDK is bordering on unusable on the client side.

@dglozic
Copy link
Author

dglozic commented Mar 3, 2018

image

@widget-
Copy link

widget- commented Mar 5, 2018

Yep, Just verified it as well.

It looks like the distfile generator is pulling in folders from the source code that should be ignored, including the tests folder which is probably the biggest part.

@dglozic
Copy link
Author

dglozic commented Mar 5, 2018

Good to know, can it be fixed :-)?

@widget-
Copy link

widget- commented Mar 5, 2018

Looks like I was wrong, and it's because a dependency for request was added. I'll see about removing that in the next patch release.

@dglozic
Copy link
Author

dglozic commented Mar 5, 2018

Even before it was very large (something like 500kb) - is there a chance of analyzing it from the PoV of client (browser) side use and trimming it down further?

@dglozic
Copy link
Author

dglozic commented Mar 10, 2018

Any updates on this? It is a big problem for Watson Data Platform - it is much larger than the entire page JS chunk. Use in browsers is a legitimate and important use case.

@widget-
Copy link

widget- commented Mar 19, 2018

Will be fixed in the next patch

@dglozic
Copy link
Author

dglozic commented Mar 19, 2018

What's the ETA for it?

@widget-
Copy link

widget- commented Apr 3, 2018

Delayed pending a license review, not sure on ETA now...

@wbhuberIBM
Copy link
Contributor

wbhuberIBM commented May 9, 2018

This has been applied to Release 1.2.1. Please verify on your end whether this clears up or not. If it is correct, please close this issue. Thanks. @dglozic

@dglozic
Copy link
Author

dglozic commented May 10, 2018

Thanks, will switch to it.

@dglozic
Copy link
Author

dglozic commented May 10, 2018

Yup, confirmed that it is down in size now - looks good. Thanks!

@dglozic dglozic closed this as completed May 10, 2018
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