-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
browser-matrix.min.js file size became 4x larger, causing negative impact on web app startup time #3182
Comments
This will be the new Rust crypto library being included - v23.0.0...v23.1.0-rc.1#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R57 Pinging @richvdh - maybe the browserify build should only include Olm or we have two separate builds depending on which you prefer. This size increase isn't really expected or intended. |
The browserify build doesn't include libolm currently: if you want to use E2E with the browserified artifact you have to load it separately. We have a bunch of magic to support allowing the application to provide libolm in different ways - or not at all - and I'm really not enthusiastic about repeating that complexity for the rust implementation. We end up with lots of complexity in the application so that it behaves correctly whether or not E2E is supported by the js-sdk. We can look at removing the rust crypto library from the browserify artifact to restore the status quo for now, but that doesn't really solve the long-term problem, as we will be dropping support for libolm. Creating different browserify artifacts is a possibility, but as element-hq/element-web#11876 suggests we might want to move away from browserify anyway. |
For now, I have stubbed out the rust crypto implementation. We'll need to figure out what we are doing here long-term though, for which I have opened #3189. |
At v23.0.0, browser-matrix.min.js file size was 1.37MB. The file size jumped more than 4x to 5.67MB at v23.1.0-rc.1 and now it's 5.44MB for v23.4.0.
This jump in the file size causes some significant delays in webapp startup time especially for the browsers on mobile network environment like 4G/5G data connections.
Should the browser JS bundle be offered in "light-weight" build alongside fully-featured build. Or maybe in some modular way so that the users can pick and choose what they load in their apps.
The text was updated successfully, but these errors were encountered: