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

benchmark: add webstorage benchmark #55040

Merged

Conversation

jakecastelli
Copy link
Member

@jakecastelli jakecastelli commented Sep 21, 2024

This PR adds benchmarks to web storage feature.

There are 3 main categories covered by this PR:

Set item

Storage Type Method Performance (n=100000)
localStorage setItem 32,226.011329779365
localStorage property setter 31,983.078822509164
sessionStorage setItem 99,525.92487767464
sessionStorage property setter 96,256.61628876119

Get item

Storage Type Method Performance (n=100000)
localStorage getItem 339,745.7512670393
localStorage property getter 318,879.11897832097
sessionStorage getItem 546,089.0025795224
sessionStorage property getter 605,112.5963263614

Remove item

Storage Type Method Performance (n=100000)
localStorage removeItem 43,976.48979563462
localStorage delete property 41,734.89234719278
sessionStorage removeItem 228,343.04220928214
sessionStorage delete property 507,564.5105229822

Some quick observations:

  • The sessionStorage is faster than localStorage in general
  • Delete property seems faster than removeItem in sessionStorage

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/performance

@nodejs-github-bot nodejs-github-bot added the benchmark Issues and PRs related to the benchmark subsystem. label Sep 21, 2024
@jasnell jasnell added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2024
@nodejs-github-bot

This comment was marked as off-topic.

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jakecastelli jakecastelli added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Sep 23, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 23, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Sep 23, 2024

@H4ad H4ad added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 23, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 23, 2024
@nodejs-github-bot nodejs-github-bot merged commit 96ec7ee into nodejs:main Sep 23, 2024
58 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 96ec7ee

targos pushed a commit that referenced this pull request Oct 4, 2024
PR-URL: #55040
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
@aduh95 aduh95 mentioned this pull request Oct 9, 2024
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
PR-URL: nodejs#55040
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
@marco-ippolito marco-ippolito added the dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. label Nov 16, 2024
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
PR-URL: nodejs#55040
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. benchmark Issues and PRs related to the benchmark subsystem. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants