RFR: 8337681: PNGImageWriter uses much more memory than necessary [v2]
Laurent Bourgès
lbourges at openjdk.org
Sat Aug 3 10:30:32 UTC 2024
On Thu, 1 Aug 2024 21:51:04 GMT, Daniel Gredler <duke at openjdk.org> wrote:
>> At some point the `JPEGImageWriter` was optimized to reduce duplication / copying of rasters and data buffers (see `JDK-6266748`). However, `PNGImageWriter` never received a similar optimization, and is making unnecessary copies of raster and data buffers whenever PNG images are written.
>>
>> Measurements: In a local test, `PNGImageWriter.write( )` and callees were initially showing up as an allocation hotspot (~400k objects / ~65 MB allocated), but after these optimizations I'm seeing much better numbers (~400 objects / ~740 KB allocated).
>
> Daniel Gredler has updated the pull request incrementally with two additional commits since the last revision:
>
> - JDK-8337681: add tests for TYPE_4BYTE_ABGR
> - JDK-8337681: add tests for TYPE_INT_RGB
Lgtm, just an overall look to png writer changes
I will have a look if nobody else ramps up...
-------------
Marked as reviewed by lbourges (Committer).
PR Review: https://git.openjdk.org/jdk/pull/20432#pullrequestreview-2217017106
PR Comment: https://git.openjdk.org/jdk/pull/20432#issuecomment-2266667599
More information about the client-libs-dev
mailing list