On Tue, 28 Jul 2026 20:40:03 GMT, Sergey Bylokhov <[email protected]> wrote:
>> In the original bug the decrease in memory footprint achieved by clearing
>> these intermediate vectors was minimal compared to other changes. But
>> clearing these intermediate vectors is resulting in functional bug. So under
>> this PR we are only fixing this functional regression.
>>
>> If there is need for any more optimization, it should be taken up as a
>> separate issue with proper testing.
>
>>In the original bug the decrease in memory footprint achieved by clearing
>>these intermediate vectors was minimal compared to other changes.
>
> It still bumps the required memory significantly in some cases after the
> patch if there are no gaps, no? My point was not about an additional
> optimization, but instead about replacing this logic of cleaning on each gap
> with cleaning("absorb") "on add".
I think @mrserb has a point...for input with one continuous Y-range, subcurves
and chains are retained until the entire operation completes..valid paths with
no gap can therefore consume substantially more heap and potentially OOM..
is it possible that we retain LINK_COUNT code for y with no-gap and if there is
a gap, we consume it..
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31971#discussion_r3670909702