Create an empty spreadsheet, hold down the down arrow, notice the CPU usage jump to 50% or so.
Callgrind profile at: http://users.freedesktop.org/~michael/calc-scroll-down-profile.txt.bz2 Shows it is primarily in ScViewFunc::AdjustBlockHeight.
Help me understand this. Why is this a problem?
It's quite a lot of CPU to use to scroll down =) I would expect to just draw a bit more, not do all that re-arrangement of the row height structures - surely there must be something silly happening there ? ...
I'll look into this.
Kohei Yoshida committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=df9243626b39742a9a148bea95796f8824fee68a fdo#73606: Avoid excessive and unnecessary heap allocation of array objects. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Kohei Yoshida committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=31533d47b24680f76e769949874d41f0fe27134f fdo#73606: Avoid calling MarkDataChanged() when nothing is selected. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I've made two changes. Originally, my CPU usage was ~40%. After the 1st change, it got reduced to 28%. After the 2nd one it became 24%. I'd say this is good enough improvement for now.
Request for backport to 4.2 underway: https://gerrit.libreoffice.org/7425 https://gerrit.libreoffice.org/7426
(In reply to comment #7) > Originally, my CPU usage was ~40%. Actually it was more like 48%.
Interesting. With 4.1 I only get 16% CPU usage on scrolling.
Kohei Yoshida committed a patch related to this issue. It has been pushed to "libreoffice-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=adce7994e9cecf761381c87bc8ff77320077f894&h=libreoffice-4-2 fdo#73606: Avoid excessive and unnecessary heap allocation of array objects. It will be available in LibreOffice 4.2.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Kohei Yoshida committed a patch related to this issue. It has been pushed to "libreoffice-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b0dd584efde8b9d75fb822a4ff63e96ca36b42c1&h=libreoffice-4-2 fdo#73606: Avoid calling MarkDataChanged() when nothing is selected. It will be available in LibreOffice 4.2.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I'll call this fixed.