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(releases): stabilising observable for archived and published version documents #8027

Merged
merged 9 commits into from
Dec 14, 2024

Conversation

jordanl17
Copy link
Member

@jordanl17 jordanl17 commented Dec 12, 2024

Description

Before After
summaryFlickerBeforePR summaryFlickerAfterPR

What to review

  • Moved to using a getter style pattern for creating the observables eg:
const getObservable = () => ...

...

const memoObservable = useMemo(() => getObservable(), [])
  • Using releasesState from releasesStore to drive the emission for the returned observable (this removed the dependency on the mutable releases which was causing the flicker by returning a new observable each time releases changed
  • Moved the existing ActiveReleaseDocumentsObservable into a getter

Testing

Existing tests act as regression

Notes for release

N/A

Copy link

vercel bot commented Dec 12, 2024

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

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:21pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:21pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:21pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:21pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Dec 13, 2024 5:21pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Component Testing Report Updated Dec 13, 2024 5:17 PM (UTC)

❌ Failed Tests (6) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 13s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 14s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 43s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 57s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 29s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 16s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ❌ Failed (Inspect) 3m 48s 1 0 5
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 12s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 2m 55s 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/RangeDecoration.spec.tsx ✅ Passed (Inspect) 43s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 29s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ❌ Failed (Inspect) 2m 34s 20 0 1
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

github-actions bot commented Dec 12, 2024

⚡️ Editor Performance Report

Updated Fri, 13 Dec 2024 17:18:30 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 26.3 efps (38ms) 19.8 efps (51ms) +13ms (+32.9%) 🔴
article (body) 78.1 efps (13ms) 74.9 efps (13ms) +1ms (-/-%)
article (string inside object) 28.6 efps (35ms) 19.0 efps (53ms) +18ms (+50.0%) 🔴
article (string inside array) 25.6 efps (39ms) 18.2 efps (55ms) +16ms (+41.0%) 🔴
recipe (name) 52.6 efps (19ms) 28.6 efps (35ms) +16ms (+84.2%) 🔴
recipe (description) 58.8 efps (17ms) 31.3 efps (32ms) +15ms (+88.2%) 🔴
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
synthetic (title) 18.9 efps (53ms) 7.1 efps (141ms) +88ms (+166.0%) 🔴
synthetic (string inside object) 18.9 efps (53ms) 7.2 efps (140ms) +87ms (+163.2%) 🔴

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
article (title) 38ms 45ms 50ms 81ms 145ms 10.4s
article (body) 13ms 14ms 18ms 67ms 52ms 4.7s
article (string inside object) 35ms 37ms 43ms 250ms 334ms 6.5s
article (string inside array) 39ms 41ms 49ms 183ms 155ms 6.6s
recipe (name) 19ms 21ms 24ms 37ms 0ms 6.8s
recipe (description) 17ms 19ms 21ms 32ms 0ms 4.4s
recipe (instructions) 5ms 7ms 10ms 22ms 0ms 3.2s
synthetic (title) 53ms 57ms 68ms 281ms 538ms 13.2s
synthetic (string inside object) 53ms 57ms 96ms 433ms 821ms 8.8s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 51ms 54ms 63ms 121ms 651ms 11.9s
article (body) 13ms 15ms 19ms 188ms 303ms 5.1s
article (string inside object) 53ms 57ms 67ms 183ms 788ms 8.5s
article (string inside array) 55ms 58ms 67ms 190ms 854ms 8.4s
recipe (name) 35ms 37ms 43ms 89ms 13ms 8.8s
recipe (description) 32ms 34ms 39ms 72ms 11ms 6.0s
recipe (instructions) 5ms 7ms 8ms 40ms 4ms 3.1s
synthetic (title) 141ms 149ms 203ms 705ms 7058ms 21.9s
synthetic (string inside object) 140ms 152ms 163ms 773ms 7060ms 16.7s

📚 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.

@jordanl17 jordanl17 marked this pull request as ready for review December 13, 2024 16:41
@jordanl17 jordanl17 requested a review from a team as a code owner December 13, 2024 16:41
@jordanl17 jordanl17 requested review from rexxars and removed request for a team December 13, 2024 16:41
…v has updated; using bool filter to remove unfound release
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