I was sent a document (created by an old version of MS Office) which embedded a large EMF document (49 MB when uncompressed) as a logo. Trying to open that document stalled LO 5.4.3 for over 30 minutes. And anytime I would try to scroll in the document, LO would stall again for minutes.
On IRC, someone managed to extract the EMF document, which I'll attach to this bug report.
Steps to Reproduce:
Try to import the EMF document into a new document.
LO stalls for several minutes.
LO should gracefully handle the logo, or refuse to load it.
User Profile Reset: No
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Created attachment 138167 [details]
Problem EMF compressed with 7zip
Created attachment 138168 [details]
Problem EMF embedded in odg
Loading takes several minutes. Scrolling up and down stalls LO as well.
Created attachment 138169 [details]
Problem EMF embedded in odt
Created attachment 138170 [details]
Problem EMF as PNG
Confirmed with a 6.0 daily build from a few days ago / Windows 7.
EMF = Enhanced Metafile
Versie 18.104.22.168 (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)
Created attachment 138188 [details]
VerySleepy profiler screenshot
Attaching a screenshot of VerySleepy profile results (measured for 100s after inserting the image), it points to basegfx polygon-handling code.
I have used
perf record -e cycles -c 1000000 libreoffice problem.odt
to profile LO 4.2.8 and LO 5.4.3 when opening problem.odt
1) LO 5.4.3 is 60% slower than LO 4.2.8 (performance regression?)
2) there are non-trivial differences between the two profiles
=> rtl_math_approxEqual() added in LO 5.4.3
I will attach the two profiles.
Created attachment 138226 [details]
LO 4.2.8 profile
Created attachment 138227 [details]
LO 5.4.3 profile
Created attachment 138322 [details]
Callgrind output from master
Took it from opening the .odg
Arch Linux 64-bit
Build ID: a9a4c26ed1365ffa089654fefc8fa2f29862b6c7
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4;
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on December 7th 2017
Looks to be a dupe of see also bug 45820
WinDbg stack trace on filter insert to Draw canvas. Grinding away at b2dclipstate and b2dpolypolycutter...
Created attachment 138324 [details]
StackTrace WinDbg_x86 of 2017-11-01 TB39 build
Yep, let's dupe to it.
*** This bug has been marked as a duplicate of bug 45820 ***