forma icon indicating copy to clipboard operation
forma copied to clipboard

Failed to render (truly) enormous svg file

Open rachtsingh opened this issue 3 years ago • 3 comments

Feel free to close if this is out of scope, but I have a large (15MB) PDF file that I am trying to view, and I attempted to use forma to do it. I converted it to svg using mutool (preserving text as text), and the result was a 189 MB SVG file.

cargo run --release -p demo -- svg huge_file.svg

caused my fans to kick in and a black box to appear, but no render output. I was able to run the spaceship demo without issues before (on a 2019 MBP 16" with an AMD Radeon Pro 5300M GPU (as well as integrated graphics)).

Happy to attach a profiler if that helps you in any way! Unfortunately I can't share the PDF or SVG file directly (it is secured), but if rendering gigantic SVGs is a goal of the project, I'd like to help.

rachtsingh avatar Dec 16 '22 21:12 rachtsingh

The SVG parser/renderer is in no way complete, but it would be interesting to see where this fails. forma itself should at least fail gracefully if there's too much content for it to deal with.

I presume that forma doesn't actually finish rendering anything and hang somewhere inside of that function?

dragostis avatar Dec 16 '22 22:12 dragostis

I was able to reproduce similar behaviour on my Windows machine, NVIDIA GeForce RTX 3060 GPU, with this svg of a map. The window looks like this:

image

imor avatar Dec 17 '22 05:12 imor

This issue also appears to be resolved by migrating to usvg.

yisibl avatar May 22 '23 11:05 yisibl