Haz/refactor - #236
Conversation
Allow Rust-only checks and tests to compile without Philips native headers or libraries by gating native bindings behind the native-sdk feature.
Move region buffer sizing to Rust, validate byte counts from the native decoder, and add read_region_into for allocation reuse on tile sweeps.
Reject zero-sized thumbnail requests, cap oversized intermediate decodes, and make resize/level helpers return typed errors instead of panicking.
Avoid rebuilding the WSI truncation and color-conversion chain on every Image::view call by reusing the initialized native view.
Explain native-sdk and image features, document the Send but not Sync handle contract, and keep CI coverage for native no-image builds.
Keep decode coverage in-memory so integration tests do not leave JPEG artifacts in the repository workspace.
Expose ViewOptions for color correction and render background control, and cache per-level dimension/envelope metadata inside the native ImageView wrapper.
Avoid exposing the Rust ViewOptions shared struct to the C++ shim directly so native builds do not see an incomplete bridge type.
There was a problem hiding this comment.
philips-isyntax-rs Benchmark
Details
| Benchmark suite | Current: 7b3bd47 | Previous: 464059c | Ratio |
|---|---|---|---|
philips_i2syntax_read_region_256_lvl_0 |
1573873 ns/iter (± 164815) |
1479759 ns/iter (± 157216) |
1.06 |
philips_i2syntax_read_region_256_lvl_1 |
1302532 ns/iter (± 102165) |
1235966 ns/iter (± 48747) |
1.05 |
philips_i2syntax_read_region_512_lvl_0 |
1882575 ns/iter (± 305607) |
1842074 ns/iter (± 254818) |
1.02 |
philips_i2syntax_read_region_512_lvl_1 |
9130220 ns/iter (± 851711) |
7513428 ns/iter (± 1581274) |
1.22 |
philips_read_region_256_lvl_0 |
601741 ns/iter (± 366002) |
545043 ns/iter (± 87947) |
1.10 |
philips_read_region_256_lvl_1 |
1579552 ns/iter (± 215383) |
1290161 ns/iter (± 165060) |
1.22 |
philips_read_region_512_lvl_0 |
4555299 ns/iter (± 622399) |
3602254 ns/iter (± 308015) |
1.26 |
philips_read_region_512_lvl_1 |
4057726 ns/iter (± 402022) |
3126474 ns/iter (± 205850) |
1.30 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'philips-isyntax-rs Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 7b3bd47 | Previous: 464059c | Ratio |
|---|---|---|---|
philips_i2syntax_read_region_512_lvl_1 |
9130220 ns/iter (± 851711) |
7513428 ns/iter (± 1581274) |
1.22 |
philips_read_region_256_lvl_1 |
1579552 ns/iter (± 215383) |
1290161 ns/iter (± 165060) |
1.22 |
philips_read_region_512_lvl_0 |
4555299 ns/iter (± 622399) |
3602254 ns/iter (± 308015) |
1.26 |
philips_read_region_512_lvl_1 |
4057726 ns/iter (± 402022) |
3126474 ns/iter (± 205850) |
1.30 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @AzHicham
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #236 +/- ##
===========================================
- Coverage 90.21% 85.47% -4.74%
===========================================
Files 6 7 +1
Lines 521 654 +133
===========================================
+ Hits 470 559 +89
- Misses 51 95 +44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
No description provided.