-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace
image
crate jpeg decoder with zune-jpeg (#2376)
### Why It is much faster. On my Mac, it takes objectron JPEG decoding from 15 to 10 ms. On the web the difference is smaller: 35ms -> 29ms. See https://github.com/emilk/image-decode-bench for more. It can also decode directly to RGBA, which means we don't need to spend cycles later padding RGB to RGBA. This takes the entire `objectron` demo `App::update` down from 21 ms to 14 ms. Sadly, the `gltf` crate still use the `"jpeg"` feature of the `image` crate, so weneed to pay for the compilation and code bloat of two jpeg decoders. The `.wasm` of the web-viewer increases by 23kB (pre-compression) because of this PR. This PR also adds support for monochrome JPEGs. ### Related * image-rs/image#1845 * image-rs/image#1876 ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) <!-- This line will get updated when the PR build summary job finishes. --> PR Build Summary: https://build.rerun.io/pr/2376 <!-- pr-link-docs:start --> Docs preview: https://rerun.io/preview/1aae8d4/docs Examples preview: https://rerun.io/preview/1aae8d4/examples <!-- pr-link-docs:end -->
- Loading branch information
Showing
10 changed files
with
139 additions
and
55 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 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 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 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 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 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 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 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 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
c27d0fa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.25
.datastore/num_rows=1000/num_instances=1000/packed=false/latest_at/default
406
ns/iter (± 1
)307
ns/iter (± 1
)1.32
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/primary/default
299
ns/iter (± 0
)226
ns/iter (± 1
)1.32
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/secondaries/default
453
ns/iter (± 0
)357
ns/iter (± 0
)1.27
datastore/num_rows=1000/num_instances=1000/packed=false/range/default
3725122
ns/iter (± 133815
)2919160
ns/iter (± 24700
)1.28
datastore/num_rows=1000/num_instances=1000/gc/default
2668693
ns/iter (± 7206
)1734313
ns/iter (± 5256
)1.54
mono_points_arrow/decode_message_bundles
82229163
ns/iter (± 1368731
)65519829
ns/iter (± 1851942
)1.26
mono_points_arrow_batched/generate_message_bundles
27549572
ns/iter (± 1304552
)19196519
ns/iter (± 1839288
)1.44
mono_points_arrow_batched/generate_messages
5464601
ns/iter (± 198366
)3738375
ns/iter (± 131363
)1.46
mono_points_arrow_batched/encode_total
31972760
ns/iter (± 1443266
)24437240
ns/iter (± 619423
)1.31
mono_points_arrow_batched/decode_log_msg
522969
ns/iter (± 1910
)305653
ns/iter (± 618
)1.71
mono_points_arrow_batched/decode_total
10010337
ns/iter (± 260156
)7888198
ns/iter (± 116795
)1.27
batch_points_arrow/decode_log_msg
72861
ns/iter (± 370
)49121
ns/iter (± 147
)1.48
batch_points_arrow/decode_total
79261
ns/iter (± 387
)51533
ns/iter (± 170
)1.54
arrow_mono_points/insert
2876600410
ns/iter (± 21753047
)1891389514
ns/iter (± 5410788
)1.52
arrow_mono_points/query
1390463
ns/iter (± 13381
)922420
ns/iter (± 2808
)1.51
arrow_batch_points/query
17142
ns/iter (± 37
)12079
ns/iter (± 62
)1.42
arrow_batch_vecs/query
476986
ns/iter (± 4509
)322416
ns/iter (± 294
)1.48
This comment was automatically generated by workflow using github-action-benchmark.