resvg icon indicating copy to clipboard operation
resvg copied to clipboard

Endless loop during enable-background processing

Open JoKalliauer opened this issue 4 years ago • 5 comments

Rendering https://commons.wikimedia.org/wiki/File:Dojikko2.3.svg did not terminate after >2days

lib pic
svg
resvg >2days no image
rsvg 13,33min Dojikko2 3_rsvg
ink 9,83min Dojikko2 3

JoKalliauer avatar Mar 02 '20 17:03 JoKalliauer

Yes, that's a bug.

PS: rendering this image without filters and clip-paths makes it an abstract painting :smile:

out

RazrFalcon avatar Mar 03 '20 03:03 RazrFalcon

It's not even an endless loop, technically. It will finish eventually, but it will take a lot of time. For now, I'm not sure how to fix it.

RazrFalcon avatar Mar 03 '20 08:03 RazrFalcon

Do you know which features causes (or might cause) the problem, I would like to make a workaround for resvg_Issues_details (embedded in User:JoKalliauer/SVG_test_suites )

JoKalliauer avatar Apr 02 '21 07:04 JoKalliauer

This is because in="BackgroundImage" in filters. BackgroundImage doesn't supported by browsers and many other apps, so they work faster by not doing anything. But resvg has to rerender the BackgroundImage for each filter, which takes a lot of time. To fix it, I have to cache those images, but this a bit more complicated and will heavily increase memory usage.

In the end of the day I simply don't have enough time to fix it right now.

RazrFalcon avatar Apr 02 '21 10:04 RazrFalcon

This is because in="BackgroundImage" in filters. BackgroundImage doesn't supported by browsers and many other apps, so they work faster by not doing anything. But resvg has to rerender the BackgroundImage for each filter, which takes a lot of time. To fix it, I have to cache those images, but this a bit more complicated and will heavily increase memory usage.

In the end of the day I simply don't have enough time to fix it right now.

Thanks that's the answer I requested for creating https://commons.wikimedia.org/wiki/File:Dojikko2.3_simplified.svg, which renders within few minutes, https://commons.wikimedia.org/wiki/File:Dojikko2.3_rendersvg.png .

PS: I might was unclear : I wanted to make a workaround (simplification) on svg-side not on resvg (I know too less coding)

JoKalliauer avatar Apr 03 '21 10:04 JoKalliauer

"Fixed" by removing enable-background feature altogether. It was deprecated in SVG 2 anyway.

RazrFalcon avatar Apr 23 '23 15:04 RazrFalcon