Bug 121740 - PPT (1,2 MB) with Equation 3.0 objects is slow to load (was better with OO)
Summary: PPT (1,2 MB) with Equation 3.0 objects is slow to load (was better with OO)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All Windows (All)
: low minor
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0 target:6.3.0.2 target:6....
Keywords: filter:ppt, perf
Depends on:
Blocks: PPT
  Show dependency treegraph
 
Reported: 2018-11-27 13:57 UTC by Timur
Modified: 2022-12-28 08:42 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Original PPT (1.19 MB, application/wps-office.ppt)
2018-11-27 13:57 UTC, Timur
Details
perf flamegraph (365.77 KB, application/x-bzip)
2020-04-07 10:50 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2018-11-27 13:57:30 UTC
Created attachment 147067 [details]
Original PPT

PPT from Bug 109340  with Equation 3.0 objects opens slow in LO. Tested in Windows. File opens without dump. 
Same PPT resaved in MSO also opens similarly slow so I find it worth reporting. Note: PPTX saved in MSO opens faster.

First fileopen time for me in Windows:
75 seconds LO 6.3+, tested both with x86 and x64. 
100 seconds with LO 5.4. 
60 seconds with LO 5.2. 
40 seconds with LO 4.0.
15 seconds with OO.
MSO takes 8 seconds. 
Note: 18 seconds for PPTX saved by MSO.
Comment 1 F74072099 2018-11-29 09:16:28 UTC
Bug not reproducible in version : 6.3.0.0.alpha0+ (x64)
I used the ppt you attached as the test file and the problem you descripted didn't occur.
我載入的挺快的 the ppt is loaded fast like  lightning.
Comment 2 F74072099 2018-11-29 09:19:29 UTC
ADDITIONAL REMARKS ABOUT MY VERSION:
Version: 6.3.0.0.alpha0+ (x64)
Build ID: 0f25a3c36f27fd51453b9a9115f236b83c143684
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-27_20:06:55
Locale: zh-TW (zh_TW); UI-Language: en-US
Calc: threaded
Comment 3 Timur 2018-11-29 10:45:42 UTC
My reported slow loading is in Windows 7. OpenGL disabled.  
I also tested in Mint VM and it's 15 seconds.
Comment 4 Durgapriyanka 2018-12-01 01:08:35 UTC
I can confirm that the bug is present in 

Version: 6.0.6.2
Build ID: 0c292870b25a325b5ed35f6b45599d2ea4458e77
CPU threads: 2; OS: Windows 6.1; UI render: default; 
Locale: en-US (en_US); Calc: group

It takes about 80 seconds to load
Comment 5 Xisco Faulí 2018-12-05 15:57:00 UTC
Win only. In

Version: 6.3.0.0.alpha0+
Build ID: 1ee8d4f63adf3113a4733a479c8faf9eb65f7b8d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

it takes

real	0m9.877s
user	0m8.521s
sys	0m0.599s
Comment 6 Xisco Faulí 2018-12-05 15:59:30 UTC
Similar timing in

Versión: 6.1.3.2
Id. de compilación: 86daf60bf00efa86ad547e59e09d6bb77c699acb
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; 
Configuración regional: es-ES (es_ES); Calc: group threaded

thus, I can't reproduce it on win either. Only x64 ?
Comment 7 Buovjaga 2019-01-25 16:12:22 UTC
(In reply to Xisco Faulí from comment #6)
> Similar timing in
> 
> Versión: 6.1.3.2
> Id. de compilación: 86daf60bf00efa86ad547e59e09d6bb77c699acb
> Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; 
> Configuración regional: es-ES (es_ES); Calc: group threaded
> 
> thus, I can't reproduce it on win either. Only x64 ?

Timur said both with x86 and x64.

Timur: please, can you test again with a recent master build? I cannot repro the slowness.

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 13279b94080d87dde51bc8b8c669212bf71cacca
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-01-23_04:38:36
Locale: fi-FI (fi_FI); UI-Language: en-US
Calc: threaded
Comment 8 Noel Grandin 2019-06-03 14:35:40 UTC Comment hidden (obsolete)
Comment 9 Xisco Faulí 2019-06-03 15:49:30 UTC Comment hidden (obsolete)
Comment 10 Xisco Faulí 2019-06-03 15:51:47 UTC Comment hidden (obsolete)
Comment 11 Noel Grandin 2019-06-04 07:41:50 UTC Comment hidden (obsolete)
Comment 12 Noel Grandin 2019-06-04 12:02:55 UTC
With current master(basically 6.3) this takes 20s to load on my Windows box, which seems reasonable to me
Comment 13 Telesto 2019-06-04 12:26:31 UTC
(In reply to Noel Grandin from comment #12)
> With current master(basically 6.3) this takes 20s to load on my Windows box,
> which seems reasonable to me

Depending on the comparison I guess. It's rather slow compared to Powerpoint.. But pretty OK for LibO
Comment 14 Noel Grandin 2019-06-04 12:34:23 UTC Comment hidden (obsolete)
Comment 15 Telesto 2019-06-04 13:05:57 UTC
(In reply to Noel Grandin from comment #14)
> Maybe Telesto wants to make a flame graph and we can see where the time goes?

I would love too.. but last time I tried I got lot of PDB mismatched for some unknown reason (so I get something like this: attachment 151678 [details] [unrelated]). 

Not specific to the flamegraph script BTW, also happening with WPA (Windows Performance Analyzer)
Comment 16 Timur 2019-06-05 08:40:13 UTC
(In reply to Buovjaga from comment #7)
> Timur: please, can you test again with a recent master build? I cannot repro
> the slowness.
75 seconds for current LO 6.4+
Comment 17 Commit Notification 2019-07-05 06:47:35 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/f2c3ea4f54d634ab54702d6fe07ccd4d4d76bdc1%5E%21

tdf#121740 improve ppt load time on windows, reduce image swapout

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2019-07-08 11:13:02 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/875f65ad5240b891ed1e5b3e17946816a4afe98a%5E%21

tdf#121740 improve ppt load time on windows, reduce image swapout

It will be available in 6.3.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Timur 2019-08-28 10:55:45 UTC
I have slow HDD (no time or will to change to SDD) so loading time is now 65 secs for the first time. Next time it's 55 secs.
Comment 20 Commit Notification 2019-11-08 12:17:32 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/37e3573bb5739c94890c18ed11b4f4cc8a4df67f

tdf#121740 speed up font loading

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2019-11-22 19:32:26 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/90ea305110e5881256ba272800074a2a9f6b613d

tdf#121740 cache font data to speed up PPT load

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2019-11-24 07:46:22 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/29d2024e16ce3cb81ad7f5b5f7e1b93378a93199

tdf#121740 cache font data to speed up PPT load

It will be available in 6.4.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Timur 2019-11-25 18:33:53 UTC
On another Window system, I open in 30s in LO6.5+, as in LO6.2 and LO5.4, 20s in OO3.3. MSO takes 8 seconds. 
I don't have my previous system now to compare.
Comment 24 tommy27 2020-04-06 12:28:09 UTC Comment hidden (obsolete)
Comment 25 Timur 2020-04-07 06:45:20 UTC
Linux has a nice time command but Windows seems to have only workarounds (using power-shell or manual time or timemem utility).

Here, 1st open is slower and 2nd open faster, so I measure 2nd open. 
Can't say why numbers are different from previous, maybe because this time I launch complete suite from the command line, so it's not just the file measured manually. 

I open in 84s in LO7.0+ (with page fault #: 1000, Working set: 4 MB, Page file size: 1 MB), 100s in LO6.2, 175s in LO5.4, 80s in LO3.3, 25s in OO3.3. 
MSO takes 8 seconds (with page fault #: 42000, Working set: 100 MB, Page file size: 55 MB). 

Now, it seems to me (doesn't have to be true) that LO was never faster, as current speed is as in LO3.3, but OO was. 
Does MSO load time and memory use has something with multi-processing? 
I'm not sure if flamegraph would help, let's hope so.
Comment 26 Noel Grandin 2020-04-07 06:54:57 UTC
Our load process for PPT is particularly convoluted, we load PPT into an intermediary format, write that intermediary format out to temporary file on disk, then load the intermediary format.

So short of a full rewrite of that import process, we can't get close to Microsoft speeds.

That said, there are still a number of places that can be made faster, if anyone wants to look. 
I recommend using the community version of Intel VTune Profiler, it has a very good UI.
Comment 27 Julien Nabet 2020-04-07 10:50:05 UTC
Created attachment 159389 [details]
perf flamegraph

Here's a Flamegraph retrieved on pc Debian x86-64 with master sources updated today.
Comment 28 Timur 2020-04-07 12:36:30 UTC
(In reply to Noel Grandin from comment #26)
> Our load process for PPT is particularly convoluted, we load PPT into an
> intermediary format, write that intermediary format out to temporary file on
> disk, then load the intermediary format.
> 
> So short of a full rewrite of that import process, we can't get close to
> Microsoft speeds.
Thanks for clarification. Is it only PPT? 
Would that be a justified proposal for https://wiki.documentfoundation.org/Development/Budget2020?
Comment 29 Noel Grandin 2020-04-07 12:37:35 UTC
(In reply to Timur from comment #28)
> (In reply to Noel Grandin from comment #26)
> Thanks for clarification. Is it only PPT? 

No idea.

> Would that be a justified proposal for
> https://wiki.documentfoundation.org/Development/Budget2020?

Ditto.
Comment 30 Roman Kuznetsov 2021-09-25 14:43:16 UTC
It took 10 sec in

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1516711eb7861a08cc9fd19ec867360737a6d070
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

4 core CPU Intel Core i5 2,5GHz + SSD

I closed it as WFM

Timur, please retest and reopen it if you still have more time for opening
Comment 31 Buovjaga 2021-09-25 15:40:03 UTC
Let's rather close as fixed as there are many commits in this
Comment 32 Timur 2021-09-27 13:28:05 UTC
Roman, I think you should not close bugs with testing only LO master. 
You need to compare master with pre-bibisect version, but for those perf bugs also with Microsoft. 

Buovjaga, also: I don't have SSD but 7.3+ took 46 sec where OO took 15 sec and MSO took less than 4 seconds, all 1st time run. 
So this should only be closed if some further action is explained.
Comment 33 Roman Kuznetsov 2021-09-27 13:33:43 UTC Comment hidden (obsolete)
Comment 34 Telesto 2021-09-27 17:52:50 UTC
(In reply to Buovjaga from comment #31)
> Let's rather close as fixed as there are many commits in this

+1 

With the addition of opening a new ticket regarding comment 26 comment 32
It's still 25 seconds or so on my system only utilizing 15% of a 4 core CPU (expected 25%). It also opens with a change registered
Comment 35 Timur 2021-09-28 13:32:43 UTC
(In reply to Roman Kuznetsov from comment #33)
> What CPU do you have?
Intel Core Sandy Bridge-DT i7-2600 @ 3.40Ghz. 
Same CPU with MSO that opens it fast.
Interesting that it's real slow in Windows, but acceptable in Linux.
Comment 36 Commit Notification 2022-05-06 12:22:38 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/240a345bc3891887ed551e780ce619d8da303325

tdf#121740 reduce cost of OStorage_Impl::GetElementNames

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 37 Commit Notification 2022-05-07 06:11:38 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1fe08ae6b383c2222178a21c926480a055a87f99

tdf#121740 increase DrawingEngine::OLE_Objects cache limit

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 38 Commit Notification 2022-05-07 13:26:24 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a5af08b3ed160a569d389474dc5d5445dccf3a63

tdf#121740 fast path in cancelCommandExecution

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 39 Commit Notification 2022-05-10 13:07:01 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9a1f81f2e0fbc0306cfa6317b41fe2c0bf04fe4c

tdf#121740 reduce cost of SfxDocumentMetaData::Init

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 40 Commit Notification 2022-05-10 17:42:41 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3c25a2a114c0bb66641ad27499610fe5ee4393b9

tdf#121740 dont bother checking for VBA libraries

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 41 Commit Notification 2022-05-11 19:58:17 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2d63a011ed161a01419a40ab2fbb88796d59b20a

tdf#121740 just remove OLE_Objects limit for non-32-bit-Windows

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 42 Commit Notification 2022-05-12 06:26:49 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f7f527a0add582cde2f34d992b65ed6ec79633d4

tdf#121740 std::set->o3tl::sorted_vector in ImpEditEngine::FormatDoc

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 43 Commit Notification 2022-05-12 09:39:09 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/301b5c0aea7a525c436b0f2f54a8cef8be947c89

tdf#121740 avoid some temporary OUString construction

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 44 Commit Notification 2022-05-13 08:59:27 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8ad920befe1290c40ef762e8d7d9797b1924f5d2

tdf#121740 reduce cost of mathml parsing

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 45 Commit Notification 2022-05-13 12:01:31 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d01f8813084b245492c83cf750bb59bcd2659621

tdf#121740 cheaper to clear namespacemap rather than allocating

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 46 Commit Notification 2022-05-14 17:14:56 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/22e08a3d8b043ce0ff2424d3fa0a704804afc567

tdf#121740 cache hashcode in SequenceAsHashMap

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 47 Commit Notification 2022-05-16 13:15:11 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e6cca743556c2135d5e381cdbd883e937221eef9

tdf#121740 elide temporary CacheItem object in BaseContainer::getByName

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 48 Lars Jødal 2022-12-28 07:49:23 UTC
Works fine for me, running Windows 10.

Test times on the file from attachment 147067 [details]:

22 seconds with LO 3.6.7.2
18 seconds with LO 5.4.7.2
12 seconds with LO 7.3.7.2
8 seconds with LO 7.4.3.2
while for comparison PowerPoint 365 took 11 seconds to open the file.

To make sure that it was not a question of caching, the file was in all cases opened twice, with the time from the second opening (where the system would have things in cache).

Thus, the file now opens considerably faster than in earlier versions, and faster than in PowerPoint.
Comment 49 Buovjaga 2022-12-28 08:42:08 UTC
Worksforme is the wrong status here as we have commits toward this.