Ungrouping is extremely slow with many objects

Summary:

Ungrouping objects with many sub-objects is extremely slow (10's of seconds and longer).

Steps to reproduce:

  • open Inkscape
  • open the attached file
  • Select the main group
  • Ungroup it

(Second)

  • Ungroup again

What happened?

(First) Inkscape appears to freeze, but eventually manages to ungroup.

(Second) Inkscape appears to freeze, and it hasn't finished ungrouping yet (over a minute later)

What should have happened?

Should have ungrouped without such a delay.

Sample attachments: signposts-vectorstock_38930472.ai

Version info

Inkscape 1.2.1 (9c6d41e, 2022-07-14)

    GLib version:     2.64.6
    GTK version:      3.24.20
    glibmm version:   2.64.2
    gtkmm version:    3.24.2
    libxml2 version:  2.9.10
    libxslt version:  1.1.34
    Cairo version:    1.17.6
    Pango version:    1.44.7
    HarfBuzz version: 2.6.4

    OS version:       Ubuntu 22.04.1 LTS