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
We're currently allowing image/* in the image input, but only a certain types are allowed by our backend. In particular, we recently added support for AVIF images to be output, but we don't yet support them to be uploaded. Instead of letting users upload the entire image before they get a message saying they are not supported, we should flag our support in the image selection dialog.
Also fixed a race condition issue with the clearUploadStatus callback - when the image fails to be uploaded, eg rejected because of an unsupported format, the value doesn't seem to have a value - and thus does not get unset. Instead it is stuck in the pending state (100% done) until someone resets it. I don't quite see the need to check before unsetting - but let me know if I am overlooking something.
Did some minor typing/lint cleanups along the way.
What to review
Do image uploads still work as expected?
Are there dragons to be aware of?
There are so many layers I had to add these types to - are some of these meant to be "backend agnostic" and thus I should only apply it to the ones that deals with the Sanity CDN specifically?
Testing
Ideally there should be a test to ensure that you can't select eg an AVIF, but I couldn't find a good way of doing so at the moment :/
Notes for release
Fixed an issue where unsupported image types would be uploaded but then rejected by the server. Only accepted image file types are now
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
67ms
72ms
221ms
422ms
13.5s
article (body)
18ms
20ms
38ms
202ms
328ms
6.1s
article (string inside object)
55ms
57ms
63ms
113ms
253ms
8.5s
article (string inside array)
65ms
68ms
78ms
239ms
845ms
9.5s
recipe (name)
32ms
35ms
38ms
103ms
14ms
9.5s
recipe (description)
30ms
31ms
36ms
53ms
0ms
6.1s
recipe (instructions)
6ms
8ms
8ms
12ms
0ms
3.3s
synthetic (title)
67ms
72ms
76ms
388ms
1287ms
14.7s
synthetic (string inside object)
66ms
70ms
77ms
341ms
1942ms
10.1s
🧪 Experiment result
The performance result of this branch
Benchmark
latency
p75
p90
p99
blocking time
test duration
article (title)
61ms
64ms
72ms
293ms
453ms
13.1s
article (body)
18ms
20ms
37ms
272ms
331ms
6.1s
article (string inside object)
56ms
62ms
71ms
193ms
349ms
8.6s
article (string inside array)
66ms
73ms
81ms
395ms
1080ms
9.7s
recipe (name)
32ms
34ms
42ms
60ms
0ms
9.4s
recipe (description)
29ms
30ms
31ms
62ms
0ms
5.8s
recipe (instructions)
6ms
8ms
9ms
53ms
15ms
3.3s
synthetic (title)
65ms
69ms
72ms
388ms
1423ms
15.5s
synthetic (string inside object)
66ms
69ms
86ms
467ms
1447ms
10.0s
📚 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
We're currently allowing
image/*
in the image input, but only a certain types are allowed by our backend. In particular, we recently added support for AVIF images to be output, but we don't yet support them to be uploaded. Instead of letting users upload the entire image before they get a message saying they are not supported, we should flag our support in the image selection dialog.Also fixed a race condition issue with the
clearUploadStatus
callback - when the image fails to be uploaded, eg rejected because of an unsupported format, the value doesn't seem to have a value - and thus does not get unset. Instead it is stuck in the pending state (100% done) until someone resets it. I don't quite see the need to check before unsetting - but let me know if I am overlooking something.Did some minor typing/lint cleanups along the way.
What to review
Testing
Ideally there should be a test to ensure that you can't select eg an AVIF, but I couldn't find a good way of doing so at the moment :/
Notes for release