Skip to content

Pathological group nesting and creation during internal PDF import

Summary:

The internal PDF import has a nasty habit of creating groups of groups of groups of groups of groups of groups … This has come to a head with the attached document. Import page 2 of the PDF and you get a group of 1 object, in turn a group of over 40,000 objects, each one being another group. This is so insanely bad that after leaving a 10th gen Core i7 CPU to ungroup it for an hour, it never completed. That single page is 16 MB of SVG data, so bad that I can’t even hand-ungroup it in my text editor as I can’t find the other end of the offending group.

Use the Poppler import mode, and this does not happen: you gets lots of single objects and Inkscape is just painfully slow rather than actually seize up solid indefinitely.

Steps to reproduce:

Take the attached PDF and import page 2 using the internal import method. Click on any tower, and you get a group of 1 item. Ungroup that item to get a group of over 40,000 more groups.

What happened?

Obsessive level of unnecessary grouping.

What should have happened?

Not making every wretched thing into a group of groups of groups.

Granted, I am not really sure what is truly wrong. The groups of groups of groups is generally just an irritation, but in this case, Inkscape is incapable of ungrouping the resulting mess, and that is a separate problem that, if resolved, would mitigate the obsessive need to create so many nested groups …

Sample attachments: dokumen.tips_487-design-drawings-132kv-overhead-lines1.pdf

Version info

Inkscape 1.2.1 (9c6d41e410, 2022-07-14)
Windows 10 64-bit
Edited by Daniel Beardsmore
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information