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

feat(sanity): omit search weights when possible #7751

Draft
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

juice49
Copy link
Contributor

@juice49 juice49 commented Nov 5, 2024

Description

When conducting a search, consumers may skip sorting via the skipSortByScore option. In this scenario, it's not necessary to query for weights.

Examples of this include:

  • Document list filtering.
  • Global search when sorting by properties other than relevance, such as updated at or created at.

What to review

Testing

Notes for release

When conducting a search, consumers may skip sorting via the `skipSortByScore` option. In
this scenario, it's not necessary to query for weights.
Copy link

vercel bot commented Nov 5, 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 Nov 5, 2024 9:40am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 9:40am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 9:40am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 9:40am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 9:40am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Nov 5, 2024 9:40am

Copy link
Contributor

github-actions bot commented Nov 5, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Component Testing Report Updated Nov 5, 2024 9:50 AM (UTC)

❌ Failed Tests (1) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 45s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 31s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 38s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 19s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 10s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 45s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 46s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 16s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 9s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 27s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ❌ Failed (Inspect) 46s 11 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 Nov 5, 2024

⚡️ Editor Performance Report

Updated Tue, 05 Nov 2024 09:51:46 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 16.4 efps (61ms) 16.5 efps (61ms) -1ms (-0.8%)
article (body) 53.1 efps (19ms) 53.3 efps (19ms) -0ms (-0.5%)
article (string inside object) 17.2 efps (58ms) 18.2 efps (55ms) -3ms (-5.2%)
article (string inside array) 14.8 efps (68ms) 15.4 efps (65ms) -3ms (-3.7%)
recipe (name) 30.3 efps (33ms) 30.3 efps (33ms) +0ms (-/-%)
recipe (description) 34.5 efps (29ms) 35.7 efps (28ms) -1ms (-3.4%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (7ms) +1ms (-/-%)
synthetic (title) 15.4 efps (65ms) 14.3 efps (70ms) +5ms (+7.7%)
synthetic (string inside object) 15.0 efps (67ms) 14.7 efps (68ms) +2ms (+2.3%)

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) 61ms 64ms 67ms 279ms 637ms 13.4s
article (body) 19ms 21ms 28ms 177ms 141ms 5.9s
article (string inside object) 58ms 63ms 71ms 212ms 249ms 8.7s
article (string inside array) 68ms 70ms 78ms 220ms 765ms 9.8s
recipe (name) 33ms 36ms 41ms 74ms 0ms 8.4s
recipe (description) 29ms 30ms 36ms 57ms 0ms 5.9s
recipe (instructions) 6ms 8ms 9ms 10ms 0ms 3.2s
synthetic (title) 65ms 69ms 80ms 240ms 1190ms 15.6s
synthetic (string inside object) 67ms 72ms 89ms 546ms 1850ms 10.0s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 61ms 67ms 89ms 143ms 314ms 13.7s
article (body) 19ms 21ms 26ms 114ms 150ms 5.9s
article (string inside object) 55ms 59ms 69ms 104ms 187ms 8.2s
article (string inside array) 65ms 71ms 78ms 122ms 605ms 9.1s
recipe (name) 33ms 35ms 40ms 86ms 0ms 8.8s
recipe (description) 28ms 30ms 42ms 142ms 16ms 6.1s
recipe (instructions) 7ms 8ms 9ms 11ms 0ms 3.2s
synthetic (title) 70ms 75ms 113ms 182ms 1196ms 15.4s
synthetic (string inside object) 68ms 71ms 94ms 163ms 1067ms 9.6s

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

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.

1 participant