Bug Hunting Session
Bug 100051 - com.sun.star.view.XViewCursor::goDown() performance in Writer
Summary: com.sun.star.view.XViewCursor::goDown() performance in Writer
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.3.0 target:5.2.0.1 target:5.1.4
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-25 11:47 UTC by Miklos Vajna
Modified: 2016-10-25 18:55 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miklos Vajna 2016-05-25 11:47:46 UTC
Steps to reproduce:

1) Create a Writer document of at least 1000 lines.

2) Add a basic macro that has the following contents:

oCursor = ThisComponent.CurrentController.ViewCursor
oCursor.goDown(1000, true)

For some reason this goes down line by line. 9585c8b8c8d8724cc1bad4a2060c828c15599929 (loplugin:constantparam in sw, 2016-03-22) removed the internal API to go down by multiple lines. A better fix to address the clang plugin would be to actually use the parameter in the XViewCursor implementation. That would give better performance, and would restore this (otherwise useful) functionality.
Comment 1 Commit Notification 2016-05-26 05:42:52 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cbe78f817da8db78d226b3ad2b1a10d0c2dcf188

tdf#100051 Partially revert "loplugin:constantparam in sw"

It will be available in 5.2.0.

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.
Comment 2 Commit Notification 2016-05-26 07:41:33 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=de9ae2ffab45bf6a2ddb2dcba961591bd9b693da&h=libreoffice-5-2

tdf#100051 Partially revert "loplugin:constantparam in sw"

It will be available in 5.2.0.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.
Comment 3 Commit Notification 2016-05-26 08:42:44 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=360c8458eee259eb8ca46da395621c7ec48a49ba&h=libreoffice-5-1

tdf#100051 Partially revert "loplugin:constantparam in sw"

It will be available in 5.1.4.

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.
Comment 4 Daniël van Vuuren 2016-06-03 11:11:30 UTC
Verified change of behavior in:

Version: 5.3.0.0.alpha0+
Build ID: 6b3b352b06d92ef20194b9a992a521af2ef07b48
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:master, Time: 2016-06-03_01:35:48

Version: 5.2.0.0.beta1+
Build ID: b6230835b927e0053687fae6026fa3603600f321
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:libreoffice-5-2, Time: 2016-06-03_02:09:38

Version: 5.1.5.0.0+
Build ID: 1245bead3a68c9495a870f194f3c523b3b78cf87
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:libreoffice-5-1, Time: 2016-06-02_04:43:39