Bug 169116 - FILEOPEN DOCX Opening certain file with thousands of frames is slow
Summary: FILEOPEN DOCX Opening certain file with thousands of frames is slow
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: DOCX-Frames
  Show dependency treegraph
 
Reported: 2025-10-28 16:01 UTC by Gabor Kelemen (Collabora)
Modified: 2025-11-14 07:06 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word 2016 (344.21 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-10-28 16:01 UTC, Gabor Kelemen (Collabora)
Details
Flamegraph of opening it (2.16 MB, image/svg+xml)
2025-10-28 16:02 UTC, Gabor Kelemen (Collabora)
Details
First half of the example file (190.73 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-10-28 16:12 UTC, Gabor Kelemen (Collabora)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (Collabora) 2025-10-28 16:01:38 UTC
Created attachment 203586 [details]
Example file from Word 2016

Attached user-generated file contains some 13844 text frames and 4859 images. Opening it takes several minutes on a rather strong CPU, but after that it is usable, there is no endless loop.

1. Open attached file
-> takes 5-10 minutes.

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d60ff8c8bd4e3ebf8f84f53448ead3c838332ea9
CPU threads: 16; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: de-DE (hu_HU); UI: en-US
Calc: threaded

Seems like this was never fast in the past.
Comment 1 Gabor Kelemen (Collabora) 2025-10-28 16:02:34 UTC
Created attachment 203587 [details]
Flamegraph of opening it

Made with:

$ OOO_EXIT_POST_STARTUP=1 SAL_USE_VCLPLUGIN=gen perf record  -F 99 -g --call-graph dwarf,16578 instdir/program/swriter MultiFrame-Load.docx
Comment 2 Gabor Kelemen (Collabora) 2025-10-28 16:12:45 UTC
Created attachment 203588 [details]
First half of the example file

If I cut it back to 42 pages from 83 in Word, then opening this half takes about 1:10 on my machine, while loading all 83 pages takes about 4:20.
Comment 3 GJord 2025-11-12 02:42:05 UTC
System specs:
Intel Core i9-14900K CPU (24 cores) | 96 GB DDR5 RAM | RTX 4060 Ti GPU | NVMe SSD storage

Results:
– Opening the attached DOCX file containing ~13 000 text frames and ~4800 images took several minutes to load (similar to reporter’s experience).
– During load, CPU utilization stayed high across multiple cores. Writer window appeared “Not Responding” for most of the process.
– After the document finally opened, interface responsiveness returned, but scrolling and editing remained sluggish for several minutes.
Comment 4 GJord 2025-11-14 07:06:06 UTC
^Set status to NEW per last comment.