You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will add support for Global Document References (GDR) in the Studio. A Global Document Reference can reference something inside another project across the user's Sanity organization.
The implementation is very much alike cross-dataset-references, but there is a separate schema type that has it's unique config options:
We don't want to release this yet to the public just yet, but it would be great if we could start reviewing it, so that it's ready to go when we need it. It also makes it possible to get some more test usage before we announce it.
What to review
That we are happy with the config options.
That the current implementation works well enough to be merged to next.
Testing
Open up the test studio in this branch, and select "playground (Staging)" workspace. Go to "Standard Inputs" and "Global document references test":
There is also added some automatic tests.
Note that the API currently only works in staging, and needs to be released first.
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)
46ms
69ms
83ms
519ms
1002ms
12.6s
article (body)
14ms
16ms
25ms
224ms
227ms
5.9s
article (string inside object)
39ms
42ms
46ms
140ms
128ms
6.6s
article (string inside array)
44ms
46ms
48ms
144ms
162ms
7.0s
recipe (name)
23ms
26ms
28ms
57ms
0ms
7.3s
recipe (description)
21ms
23ms
25ms
33ms
0ms
5.1s
recipe (instructions)
6ms
8ms
9ms
16ms
0ms
3.2s
synthetic (title)
54ms
57ms
76ms
286ms
1344ms
13.1s
synthetic (string inside object)
49ms
54ms
57ms
428ms
1084ms
8.5s
🧪 Experiment result
The performance result of this branch
Benchmark
latency
p75
p90
p99
blocking time
test duration
article (title)
45ms
52ms
88ms
463ms
1055ms
12.3s
article (body)
17ms
23ms
76ms
186ms
243ms
6.1s
article (string inside object)
40ms
44ms
47ms
63ms
137ms
6.9s
article (string inside array)
48ms
51ms
55ms
231ms
420ms
7.8s
recipe (name)
21ms
23ms
30ms
49ms
0ms
7.2s
recipe (description)
19ms
21ms
23ms
32ms
0ms
4.7s
recipe (instructions)
6ms
8ms
9ms
28ms
0ms
3.3s
synthetic (title)
54ms
58ms
85ms
300ms
1091ms
13.0s
synthetic (string inside object)
51ms
55ms
68ms
244ms
982ms
8.5s
📚 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.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is @skogsmaskin writing BTW 👋
This will add support for Global Document References (GDR) in the Studio. A Global Document Reference can reference something inside another project across the user's Sanity organization.
The implementation is very much alike cross-dataset-references, but there is a separate schema type that has it's unique config options:
We don't want to release this yet to the public just yet, but it would be great if we could start reviewing it, so that it's ready to go when we need it. It also makes it possible to get some more test usage before we announce it.
What to review
next
.Testing
Open up the test studio in this branch, and select "playground (Staging)" workspace. Go to "Standard Inputs" and "Global document references test":
There is also added some automatic tests.
Note that the API currently only works in staging, and needs to be released first.
Notes for release
N/A - not to be announced yet.