Bug 137544 - Opening complex electric PDF drawing is very slow with high CPU in Linux
Summary: Opening complex electric PDF drawing is very slow with high CPU in Linux
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.1.6.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0 target:7.6.0
Keywords: filter:pdf
Depends on:
Blocks: PDF-Import-Draw
  Show dependency treegraph
 
Reported: 2020-10-16 20:24 UTC by amar.bajnath
Modified: 2023-05-03 10:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
An electrical power layout (1.70 MB, application/pdf)
2020-10-16 20:27 UTC, amar.bajnath
Details

Note You need to log in before you can comment on or make changes to this bug.
Description amar.bajnath 2020-10-16 20:24:39 UTC
Description:
As i click on a pdf file of a building drawing plan to open, I can see the loading bar at the bottom but it starts hanging about 75% into the load. When it finishes loading (about 5 mins), I cannot do or click on anything because, it starts to hang again and the 'force quit/wait' dialog box comes up.

Steps to Reproduce:
1.Open drawing file
2.Wait for file to load
3.

Actual Results:
Application hangs.

Expected Results:
Should have allowed me to manipulate the file (change the rotation and zoom)


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 7.0.2.2
Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994
CPU threads: 12; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL
Comment 1 amar.bajnath 2020-10-16 20:27:06 UTC
Created attachment 166444 [details]
An electrical power layout
Comment 2 Timur 2020-10-21 14:59:43 UTC
Very slow to load. I don't see hang in Windows and Linux with LO 7.1+. Just hard to deal with this drawing. And don't know that rotate of page is possible.
Comment 3 Александра Пилипон 2021-07-21 17:48:02 UTC
don't repro in

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: c5ca46e75e28ba4245d8544ca53c71fea87d1bbd
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-US (ru_UA); UI: en-GB
Calc: threaded
Comment 4 Timur 2021-07-22 13:57:10 UTC
I rechecked in 7.3+ Linux and very slow with high CPU so I set New. 
Seems better in Windows, so Linux only so far, also with older.
Comment 5 Commit Notification 2022-06-29 20:11:07 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 reduce work in sdext::PageElement::resolveUnderlines

It will be available in 7.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 6 Commit Notification 2022-06-30 06:51:30 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 std::unordered_set is cheaper here

It will be available in 7.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 7 Commit Notification 2022-06-30 06:51:38 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/333e24b347293503f1c3abf8871769191b0c751d

tdf#137544 slightly improve perf of pdf parsing

It will be available in 7.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 8 Commit Notification 2022-06-30 06:51:46 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 only construct SdAnimationInfo when we need it

It will be available in 7.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 9 Commit Notification 2022-06-30 17:13:47 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 reduce cost of ChildrenManagerImpl::Update

It will be available in 7.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 10 Commit Notification 2022-06-30 20:14:57 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 elide some UNO_QUERY

It will be available in 7.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 11 Commit Notification 2022-07-01 06:17:33 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 reduce cost of dynamic_cast

It will be available in 7.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 12 Commit Notification 2022-07-01 09:28:27 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 ReformatAllEdgeObjects use recursion

It will be available in 7.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 13 Commit Notification 2022-07-01 13:33:35 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/779489ca5ad11476b39555d7b3169d320ff89d4b

tdf#137544 reserve space in polygon

It will be available in 7.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 14 Roman Kuznetsov 2022-07-02 12:37:52 UTC
LO opens it fast but still takes around 80% CPU load and has some delay while you scroll it in

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

But the PDF has over 43 thousands shapes! 

May be better would ask user how open the PDF: as PDF viewer or as PDF editor?
Comment 15 Commit Notification 2022-07-02 16:05:12 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

Revert "tdf#137544 std::unordered_set is cheaper here"

It will be available in 7.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 16 Commit Notification 2022-07-04 13:13:20 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 avoid some temporary OUString

It will be available in 7.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 17 Commit Notification 2022-07-04 13:42:58 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 reduce cost of SolarMutex checking

It will be available in 7.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 18 Commit Notification 2022-07-04 13:50:08 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 avoid some dynamic_cast cost

It will be available in 7.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 19 Commit Notification 2022-07-04 14:29:28 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/895643431e6aea672158bae3772a36f26cd05cde

tdf#137544 no need to create a OUStringBuffer here

It will be available in 7.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 20 Commit Notification 2022-07-04 19:05:05 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 reserve space in polypolygon

It will be available in 7.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 21 Commit Notification 2022-07-05 09:51:40 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 reduce unnecessary broadcasting when creating shape

It will be available in 7.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 2022-07-05 09:52:49 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 reduce ref-counting traffic

It will be available in 7.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 23 Commit Notification 2023-05-02 16:58:06 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 reduce cost of AccessibleEventNotifier

It will be available in 7.6.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 24 Commit Notification 2023-05-02 16:58:08 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0431264c2bfbc73c6b7aa832ad7ac458daaeddc6

tdf#137544 no need to broadcast in ~SdPage

It will be available in 7.6.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 25 Commit Notification 2023-05-02 16:59:11 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6e63866ea343dea0d1c528c9f7069be44bc034c0

tdf#137544 use cheaper method to scan accessibility child list

It will be available in 7.6.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 26 Commit Notification 2023-05-03 10:48:37 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137544 simplify SdrObjList destructor

It will be available in 7.6.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.