-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: React SDK cold-start optimizations (#1488)
Improves the cold-start performance of our React Video SDK by extracting the core parts of the `CallStatsLatencyChart` component in a separate lazy-loaded chunk. This saves around ~150KB of minified JS from being loaded, parsed, and compiled by the browser. We now use code-size-optimized Protobuf models. Binary encoding and decoding now happen through reflection (saves ~60KB minified). The total saving is ~210KB after minification, a drop of ~30%. Additionally, the SDK is now marked as free of side effects thus, allowing bundlers to tree-shake the unused code more efficiently. ### Possible breaking changes - `CallStats` exported a few enums that weren't intended to be part of the public API (`Statuses`). This is now fixed. Customers possibly relying on this enum are advised to copy it in their codebase. - `CallStatsLatencyChart` isn't exported anymore. ### New - Dependencies were updated to their latest versions - Now we use `rollup@4` to bundle libs and `vite@5` to run our sample apps - CallStats component now has an optional `showCodecInfo`. When enabled, it will show the name of the codec currently in use. --------- Co-authored-by: Matvei Andrienko <m.y.andrienko@outlook.com>
- Loading branch information
1 parent
e2042dc
commit 972e579
Showing
34 changed files
with
1,699 additions
and
8,430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.