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

fix: replace useMemo with useState #8095

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented Dec 18, 2024

I missed these in #8047, the same description, release notes etc is applicable for this PR

@stipsan stipsan requested a review from bjoerge December 18, 2024 11:05
@stipsan stipsan requested a review from a team as a code owner December 18, 2024 11:05
Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio 🔄 Building (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 11:05am
performance-studio 🔄 Building (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 11:05am
test-next-studio 🔄 Building (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 11:05am
test-studio 🔄 Building (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 11:05am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Dec 18, 2024 11:05am

@stipsan stipsan added this pull request to the merge queue Dec 18, 2024
Merged via the queue into next with commit 399a7be Dec 18, 2024
30 of 35 checks passed
@stipsan stipsan deleted the fix-more-useMemo-to-useState branch December 18, 2024 11:06
Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Dec 18, 2024 11:15 AM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 10s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 13s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 39s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 55s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 28s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 15s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 29s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 11s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 2m 44s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 49s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 14s 3 9 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 29s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 53s 21 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

Copy link
Contributor

⚡️ Editor Performance Report

Updated Wed, 18 Dec 2024 11:17:18 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
recipe (name) 50.0 efps (20ms) 50.0 efps (20ms) +0ms (-/-%)
recipe (description) 55.6 efps (18ms) 55.6 efps (18ms) +0ms (-/-%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (5ms) -1ms (-/-%)
synthetic (title) 17.5 efps (57ms) 18.7 efps (54ms) -4ms (-6.1%)
synthetic (string inside object) 17.9 efps (56ms) 18.5 efps (54ms) -2ms (-3.6%)

efps — editor "frames per second". The number of updates assumed to be possible within a second.

Derived from input latency. efps = 1000 / input_latency

Detailed information

🏠 Reference result

The performance result of sanity@latest

Benchmark latency p75 p90 p99 blocking time test duration
recipe (name) 20ms 21ms 26ms 58ms 0ms 7.7s
recipe (description) 18ms 20ms 24ms 39ms 0ms 5.0s
recipe (instructions) 6ms 7ms 10ms 21ms 0ms 3.2s
synthetic (title) 57ms 59ms 68ms 272ms 666ms 14.4s
synthetic (string inside object) 56ms 60ms 70ms 188ms 1004ms 8.9s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
recipe (name) 20ms 22ms 25ms 54ms 0ms 6.9s
recipe (description) 18ms 20ms 22ms 33ms 0ms 4.6s
recipe (instructions) 5ms 7ms 8ms 10ms 0ms 3.1s
synthetic (title) 54ms 58ms 69ms 344ms 500ms 17.6s
synthetic (string inside object) 54ms 56ms 64ms 282ms 551ms 8.2s

📚 Glossary

column definitions

  • benchmark — the name of the test, e.g. "article", followed by the label of the field being measured, e.g. "(title)".
  • latency — the time between when a key was pressed and when it was rendered. derived from a set of samples. the median (p50) is shown to show the most common latency.
  • p75 — the 75th percentile of the input latency in the test run. 75% of the sampled inputs in this benchmark were processed faster than this value. this provides insight into the upper range of typical performance.
  • p90 — the 90th percentile of the input latency in the test run. 90% of the sampled inputs were faster than this. this metric helps identify slower interactions that occurred less frequently during the benchmark.
  • p99 — the 99th percentile of the input latency in the test run. only 1% of sampled inputs were slower than this. this represents the worst-case scenarios encountered during the benchmark, useful for identifying potential performance outliers.
  • blocking time — the total time during which the main thread was blocked, preventing user input and UI updates. this metric helps identify performance bottlenecks that may cause the interface to feel unresponsive.
  • test duration — how long the test run took to complete.

stipsan added a commit that referenced this pull request Dec 18, 2024
stipsan added a commit that referenced this pull request Dec 18, 2024
bjoerge added a commit that referenced this pull request Dec 19, 2024
* next: (68 commits)
  fix(deps): update dependency @sanity/icons to ^3.5.5 (#8105)
  fix(deps): update dependency @sanity/ui to ^2.10.12 (#8108)
  fix(deps): update dependency react-rx to ^4.1.10 (#8109)
  chore(deps): update dependency @sanity/tsdoc to v1.0.153 (#8107)
  chore(deps): update typescript-tooling (#8104)
  fix(deps): update dependency @sanity/icons to ^3.5.5 (#8106)
  feat(typegen): add support for astro (#8098)
  chore(deps): update dependency turbo to ^2.3.3 (#8099)
  fix(deps): Update dev-non-major (#8100)
  fix: `WebSocket is closed before the connection is established` warning (#8042)
  v3.68.1
  fix(deps): update dependency @sanity/presentation to v1.19.13 (#8102)
  v3.68.0
  fix: use consistent `framer-motion` semver range (#8094)
  refactor(core): replace `PortableTextEditor` with `EditorProvider` (#8040)
  fix: improve `SanityDefaultPreview` memoization (#8049)
  fix: tooltip position in announcements popup (#8092)
  fix: replace useMemo with useState (#8095)
  fix: replace unsafe `useMemo` with `useState` (#8047)
  fix: replace `React.createElement` with jsx runtime (#8043)
  ...
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