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

👷 Enable terser ecma: 2015 and module: true options #3413

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sethfowler-datadog
Copy link
Contributor

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: 2015
  • module: true

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

Copy link

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

🔗 RealWorld

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.69%. Comparing base (edd35a5) to head (c343aef).

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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Successfully merging this pull request may close these issues.

2 participants