designcourse
designcourse copied to clipboard
👷 Enable terser ecma: 2015 and module: true options
Motivation
This is one of a series of PRs experimenting with enabling more aggressive options for Terser, with the goal of reducing the size of the browser SDK bundles.
Changes
This PR enables the following options:
ecma: 2015module: true
Testing
- [x] Local
- [ ] Staging
- [x] Unit
- [ ] End to end
I have gone over the contributing documentation.
Bundles Sizes Evolution
| 📦 Bundle Name | Base Size | Local Size | 𝚫 | 𝚫% | Status |
|---|---|---|---|---|---|
| Rum | 148.94 KiB | 148.91 KiB | -26 B | -0.02% | ✅ |
| Logs | 52.26 KiB | 52.25 KiB | -13 B | -0.02% | ✅ |
| Rum Slim | 107.40 KiB | 107.39 KiB | -13 B | -0.01% | ✅ |
| Worker | 24.50 KiB | 24.49 KiB | -13 B | -0.05% | ✅ |
🚀 CPU Performance
| Action Name | Base Average Cpu Time (ms) | Local Average Cpu Time (ms) | 𝚫 |
|---|---|---|---|
| addglobalcontext | 0.003 | 0.008 | 0.005 |
| addaction | 0.049 | 0.299 | 0.250 |
| addtiming | 0.002 | 0.006 | 0.004 |
| adderror | 0.074 | 0.190 | 0.117 |
| startstopsessionreplayrecording | 0.010 | 0.045 | 0.036 |
| startview | 0.665 | 2.185 | 1.520 |
| logmessage | 0.037 | 0.191 | 0.155 |
🧠 Memory Performance
| Action Name | Base Consumption Memory (bytes) | Local Consumption Memory (bytes) | 𝚫 (bytes) |
|---|---|---|---|
| addglobalcontext | 26.46 KiB | 29.63 KiB | 3.17 KiB |
| addaction | 54.94 KiB | 55.43 KiB | 492 B |
| addtiming | 26.67 KiB | 27.24 KiB | 583 B |
| adderror | 60.15 KiB | 61.65 KiB | 1.50 KiB |
| startstopsessionreplayrecording | 25.44 KiB | 27.19 KiB | 1.75 KiB |
| startview | 425.10 KiB | 426.12 KiB | 1.01 KiB |
| logmessage | 55.77 KiB | 56.32 KiB | 560 B |
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 92.69%. Comparing base (edd35a5) to head (c343aef).
:warning: Report is 258 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #3413 +/- ##
==========================================
- Coverage 92.71% 92.69% -0.03%
==========================================
Files 301 301
Lines 7896 7896
Branches 1806 1806
==========================================
- Hits 7321 7319 -2
- Misses 575 577 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.