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

Huge bundle size #224

Open
AykutSarac opened this issue Aug 4, 2023 · 7 comments
Open

Huge bundle size #224

AykutSarac opened this issue Aug 4, 2023 · 7 comments

Comments

@AykutSarac
Copy link
Contributor

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[x] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

Currently bundle size is very big due to elkjs, it effects both the IDE and the performance of the applications.

image

Expected behavior

Bundle shouldn't be that big.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Libs:
- react version: X.Y.Z
- realayers version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@amcdnl
Copy link
Member

amcdnl commented Aug 4, 2023

ELK.js is the core layout library - i will investigate if there is a better way to bundle it

@AykutSarac
Copy link
Contributor Author

I see that 'elk.bundled' could be potentially replaced with 'elk-api' which reduce bundle size significantly.

@amcdnl
Copy link
Member

amcdnl commented Aug 22, 2023

Oh really? Mind sharing details?

@AykutSarac
Copy link
Contributor Author

Oh really? Mind sharing details?

I just tried it as mentioned here: https://github.com/kieler/elkjs#typescript
However it needs workerUrl if it will use the elk-api, not sure if there's but maybe you can come up with a solution (maybe dynamic loading? not sure).

@amcdnl
Copy link
Member

amcdnl commented Aug 22, 2023

Well if you dynamic loaded, wouldn't you still have a large size ( just happens later )?

@AykutSarac
Copy link
Contributor Author

Definitely 😞 I was thinking it could be opt'd like the developer can pass the workerUrl from a cdn but for offline development you'd still need the package... Elkjs is a very high weight package as a dependency.

@amcdnl
Copy link
Member

amcdnl commented Aug 22, 2023

Ya, ELK is not fun to work with either but it has the best layout engine that I've found.

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

2 participants