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

⚡️Reduce bundle size: simplify config, use const enum, remove str redundancies #2877

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

amortemousque
Copy link
Contributor

@amortemousque amortemousque commented Jul 19, 2024

Motivation

Reduce bundle size

Changes

  • Use const enum for DOM_EVENT
  • Remove warning string redundancies
  • Simplify configuration validation

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@amortemousque amortemousque force-pushed the aymeric/bundle-size-reduction branch from c247083 to bf005bd Compare July 19, 2024 14:04
@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.75%. Comparing base (2490414) to head (49a8bac).
Report is 168 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2877      +/-   ##
==========================================
+ Coverage   93.68%   93.75%   +0.07%     
==========================================
  Files         266      266              
  Lines        7584     7575       -9     
  Branches     1687     1685       -2     
==========================================
- Hits         7105     7102       -3     
+ Misses        479      473       -6     

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

Copy link

cit-pr-commenter bot commented Jul 19, 2024

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 161.62 KiB 160.21 KiB -1448 B -0.87%
Logs 57.95 KiB 56.82 KiB -1156 B -1.95%
Rum Slim 110.14 KiB 108.78 KiB -1393 B -1.24%
Worker 25.21 KiB 25.21 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base Average Cpu Time (ms) Local Average Cpu Time (ms) 𝚫
addglobalcontext 0.001 0.002 0.001
addaction 0.030 0.049 0.019
adderror 0.031 0.045 0.014
addtiming 0.001 0.001 0.001
startview 0.913 1.579 0.666
startstopsessionreplayrecording 0.780 1.720 0.940
logmessage 0.019 0.034 0.015
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext 20.46 KiB 19.33 KiB -1160 B
addaction 72.73 KiB 71.13 KiB -1640 B
adderror 86.60 KiB 87.54 KiB 970 B
addtiming 19.47 KiB 17.04 KiB -2489 B
startview 349.22 KiB 352.68 KiB 3.46 KiB
startstopsessionreplayrecording 14.21 KiB 12.66 KiB -1590 B
logmessage 70.55 KiB 69.10 KiB -1486 B

🔗 RealWorld

@amortemousque amortemousque force-pushed the aymeric/bundle-size-reduction branch from c316478 to 5a46aa6 Compare July 19, 2024 18:48
@amortemousque amortemousque force-pushed the aymeric/bundle-size-reduction branch from 5a46aa6 to 7d552bd Compare July 22, 2024 09:59
@amortemousque amortemousque changed the title Experiment to reduce the bundle size ⚡️Reduce bundle size: simplify config, use const enum, remove str redundancies Jul 22, 2024
@amortemousque amortemousque marked this pull request as ready for review July 22, 2024 11:59
@amortemousque amortemousque requested a review from a team as a code owner July 22, 2024 11:59
@amortemousque
Copy link
Contributor Author

/to-staging

@dd-devflow
Copy link
Contributor

dd-devflow bot commented Jul 22, 2024

🚂 Branch Integration: starting soon, median merge time is 0s

Commit 49a8bac5c1 will soon be integrated into staging-30.

Use /to-staging -c to cancel this operation!

dd-mergequeue bot added a commit that referenced this pull request Jul 22, 2024
Integrated commit sha: 49a8bac

Co-authored-by: Aymeric Mortemousque <aymeric.mortemousque@datadoghq.com>
@dd-devflow
Copy link
Contributor

dd-devflow bot commented Jul 22, 2024

🚂 Branch Integration: This commit was successfully integrated

Commit 49a8bac5c1 has been merged into staging-30 in merge commit 2991a110a8.

Check out the triggered pipeline on Gitlab 🦊

@amortemousque amortemousque merged commit 2ef6c81 into main Jul 23, 2024
21 checks passed
@amortemousque amortemousque deleted the aymeric/bundle-size-reduction branch July 23, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants