Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

perf(rome_js_semantic): Use FX Hash function #3565

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

MichaReiser
Copy link
Contributor

@MichaReiser MichaReiser commented Nov 5, 2022

Summary

Use Fx hash functions in the semantic model to improve performance by about 10%.

Test Plan

benchmark

@MichaReiser
Copy link
Contributor Author

!bench_analyzer

@netlify
Copy link

netlify bot commented Nov 5, 2022

Deploy Preview for docs-rometools canceled.

Name Link
🔨 Latest commit 6e0f2df
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/6367ee294deb2a0009981c2a

@MichaReiser MichaReiser temporarily deployed to netlify-playground November 5, 2022 12:50 Inactive
@github-actions
Copy link

github-actions bot commented Nov 5, 2022

@github-actions
Copy link

github-actions bot commented Nov 5, 2022

Analyzer Benchmark Results

group                 main                                   pr
-----                 ----                                   --
analyzer/css.js       1.07      2.8±0.03ms     4.1 MB/sec    1.00      2.6±0.03ms     4.4 MB/sec
analyzer/index.js     1.07      7.9±0.09ms     4.2 MB/sec    1.00      7.4±0.10ms     4.4 MB/sec
analyzer/parser.ts    1.10      9.1±0.06ms     5.3 MB/sec    1.00      8.4±0.09ms     5.8 MB/sec
analyzer/router.ts    1.08      6.7±0.06ms     9.2 MB/sec    1.00      6.2±0.06ms    10.0 MB/sec

@MichaReiser MichaReiser marked this pull request as ready for review November 5, 2022 13:07
@MichaReiser MichaReiser requested a review from a team November 5, 2022 13:07
@MichaReiser MichaReiser temporarily deployed to netlify-playground November 6, 2022 09:40 Inactive
@MichaReiser
Copy link
Contributor Author

!bench_analyzer

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Analyzer Benchmark Results

group                 main                                   pr
-----                 ----                                   --
analyzer/css.js       1.07      2.9±0.01ms     4.1 MB/sec    1.00      2.7±0.03ms     4.3 MB/sec
analyzer/index.js     1.07      8.0±0.01ms     4.1 MB/sec    1.00      7.5±0.08ms     4.4 MB/sec
analyzer/parser.ts    1.09      9.2±0.02ms     5.3 MB/sec    1.00      8.4±0.01ms     5.8 MB/sec
analyzer/router.ts    1.09      6.8±0.06ms     9.1 MB/sec    1.00      6.2±0.03ms     9.9 MB/sec

@MichaReiser MichaReiser temporarily deployed to netlify-playground November 6, 2022 17:26 Inactive
@calibre-analytics
Copy link

calibre-analytics bot commented Nov 6, 2022

Comparing perf(rome_js_semantic): Use FX Hash function Snapshot #2 to median since last deploy of rome.tools.

LCP? CLS? TBT?
Overall
Median across all pages and test profiles
2.23s
from 228ms
0.0
no change
159ms
from 4ms
Chrome Desktop
Chrome Desktop • Cable
2.23s
from 228ms
0.0
no change
412ms
from 104ms
iPhone, 4G LTE
iPhone 12 • 4G LTE
1.02s
from 147ms
0.0
no change
17ms
no change
Motorola Moto G Power, 3G connection
Motorola Moto G Power • Regular 3G
15.1s
from 552ms
0.0
no change
159ms
from 4ms

1 page tested

 Home

Browser previews

Chrome Desktop iPhone, 4G LTE Motorola Moto G Power, 3G connection
Chrome Desktop iPhone, 4G LTE Motorola Moto G Power, 3G connection

Most significant changes

Value Budget
JS Parse & Compile
iPhone, 4G LTE
452ms
from 6ms
JS Parse & Compile
Motorola Moto G Power, 3G connection
1.64s
from 26ms
Total JavaScript Size in Bytes
Chrome Desktop
4.85 MB
from 86.8 KB
Total JavaScript Size in Bytes
iPhone, 4G LTE
4.85 MB
from 86.8 KB
Total JavaScript Size in Bytes
Motorola Moto G Power, 3G connection
4.85 MB
from 86.8 KB

29 other significant changes: Total Blocking Time on Motorola Moto G Power, 3G connection, JS Parse & Compile on Chrome Desktop, First Contentful Paint on Motorola Moto G Power, 3G connection, Largest Contentful Paint on Motorola Moto G Power, 3G connection, Speed Index on Motorola Moto G Power, 3G connection, Total Page Size in Bytes on Chrome Desktop, Total Page Size in Bytes on iPhone, 4G LTE, Total Page Size in Bytes on Motorola Moto G Power, 3G connection, Number of Requests on Chrome Desktop, Number of Requests on iPhone, 4G LTE, Number of Requests on Motorola Moto G Power, 3G connection, Time to Interactive on Motorola Moto G Power, 3G connection, First Contentful Paint on Chrome Desktop, Time to Interactive on Chrome Desktop, Largest Contentful Paint on Chrome Desktop, First Contentful Paint on iPhone, 4G LTE, Speed Index on Chrome Desktop, Largest Contentful Paint on iPhone, 4G LTE, Speed Index on iPhone, 4G LTE, Time to Interactive on iPhone, 4G LTE, Total Blocking Time on Chrome Desktop, Total Image Size in Bytes on Chrome Desktop, Total Image Size in Bytes on iPhone, 4G LTE, Total Image Size in Bytes on Motorola Moto G Power, 3G connection, Total HTML Size in Bytes on Chrome Desktop, Total HTML Size in Bytes on iPhone, 4G LTE, Total HTML Size in Bytes on Motorola Moto G Power, 3G connection, Lighthouse Performance Score on Motorola Moto G Power, 3G connection, Lighthouse Performance Score on Chrome Desktop

Calibre: Site dashboard | View this PR | Edit settings | View documentation

@MichaReiser MichaReiser merged commit 4b282c8 into main Nov 7, 2022
@MichaReiser MichaReiser deleted the perf/semantic-use-fx-hasher branch November 7, 2022 09:02
jeysal added a commit to jeysal/rometools that referenced this pull request Nov 8, 2022
* upstream/main:
  fix(ci): fix the release workflows for the stable release (rome#3583)
  Fix logo container margin
  Fix mobile docs regressions
  perf: End-to-end Linter and Formatter benchmarks (rome#3570)
  doc: VS Code extension (rome#3579)
  refactor(rome_cli): refactor the threading of parallel traversal to increase occupancy (rome#3577)
  [docs] Add navigation dropdown for docs (rome#3578)
  doc(rome_cli): Document `--files-max-size` option
  perf(rome_js_semantic): Use FX Hash function (rome#3565)
  fix(rome_js_analyzer): `noInvalidConstructorSuper` false positive for class expressions (rome#3561)
  Clean up mobile navigation
  doc(website): Run `cargo lintdoc` (rome#3567)
  doc: Fix install command
  Fix mobile code blocks
  Fix dark mode logo
  Update links
  Implement new website (rome#3556)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants