Bug 140443 - FILEOPEN DOCX Opening file with many tracked changes is slow
Summary: FILEOPEN DOCX Opening file with many tracked changes is slow
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx, perf
Depends on:
Blocks: Track-Changes DOCX-Track-Changes Performance
  Show dependency treegraph
 
Reported: 2021-02-16 12:28 UTC by NISZ LibreOffice Team
Modified: 2024-06-01 18:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word with many tracked changes (114.35 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-02-16 12:28 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2021-02-16 12:28:46 UTC
Created attachment 169779 [details]
Example file from Word with many tracked changes

Attached file was made in Word by inserting 100 paragraphs of lorem ipsum, then replacing each letter (some 10k in total) while change tracking was enabled.
Word opens this file in about 5 seconds on my machine while Writer takes about 25 when measured with:

$ time OOO_EXIT_POST_STARTUP=1 instdir/program/soffice ../CT-10k-letters.docx

real    0m23.534s
user    0m0.202s
sys     0m0.093s

(Note: my antivirus may or may not contribute to this value).

Steps to reproduce:
    1. Open attached file

Actual results:
Opening takes about half a minute, even with warm caches.

Expected results:
Opening could take less time.

LibreOffice details:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 380ab85b6594a013f34f5e6ec69fb569336bbb48
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

I measured similar values in 7.0 and 6.0 while 5.0 was in the 40-45 seconds range – this is not a regression. But there may be room for improvement still.
Comment 1 Dieter 2021-03-03 10:44:56 UTC
Tested with

Version: 7.1.1.2 (x64) / LibreOffice Community
Build ID: fe0b08f4af1bacafe4c7ecc87ce55bb426164676
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Opening in Writer: 15 seconds
Opening in Word 2016: 3 seconds

So same result as in comment 0: Opening in writer is five times slower (personally I think three times slower might be O. K.)
=> NEW
Comment 2 Timur 2021-09-09 14:08:22 UTC
If I save DOCX as ODT (also slow), opening is even slower. 

OO 3.3
real	0m6,244s   user	0m5,575s   sys	0m0,223s
7.3+ m DOCX
real	0m13,635s   user	0m12,862s   sys	0m0,440s
7.3+ m ODT
real	0m35,017s   user	0m33,913s   sys	0m0,472s

So I don't see this as DOCX problem, but as a general issue of slow loading of many tracked changes, that got worse from OO to LO. 
Multiple bugs may obscure that. 
Bug 144208 seems duplicate of this one, this one of some other.
Comment 3 QA Administrators 2023-09-10 03:20:31 UTC Comment hidden (obsolete)
Comment 4 Dieter 2023-10-29 13:14:03 UTC
Still more than 30 seconds for opening with

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

But I agree with Timur, that it is not a DOCX-problem.
Comment 5 Buovjaga 2024-06-01 18:06:47 UTC
With the first three patches toward bug 144208 on Linux, time with OOO_EXIT_POST_STARTUP=1 is

real    0m3,320s
user    0m2,904s
sys     0m0,408s

With 24.2 the time is

real    0m8,476s
user    0m8,303s
sys     0m0,236s