Bug 305254 - For a large document (70 pages with many figures) text editor gets very slow with the sync feature activated
Summary: For a large document (70 pages with many figures) text editor gets very slow ...
Status: RESOLVED FIXED
Alias: None
Product: kile
Classification: Applications
Component: user interface (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-16 12:13 UTC by mogliii
Modified: 2012-09-19 17:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mogliii 2012-08-16 12:13:48 UTC
I prepared a video that demonstrates the problem.

Reproducible: Always

Steps to Reproduce:
See video how to reproduce



Version 2.9.60
Using KDE Development Platform 4.9.00
Kubuntu 12.04
Comment 1 mogliii 2012-08-16 12:33:20 UTC
Screencast too large for bugs.kde.org
Can be found here: 
http://imageshack.us/clip/my-videos/232/81uaydhtyyqpiyudruyfco.mp4/
Comment 2 Michel Ludwig 2012-08-20 16:57:22 UTC
Wow, that is quite a nice bug report! If all of them were like this, it would almost be a pleasure to fix bugs ;)

I've tried it out now, but I couldn't experience any noticeable lag. Could you try out the latest KatePart/Okular as well and check whether that helps?

http://kate-editor.org/get-it/

For KatePart, you would have to "mix" the installation instructions described above with the ones on the Kile wiki (for testing live preview).

Alternatively, we could only trigger a sync whenever the line of the cursor changes. Currently, this is done on every key stroke, and this might make everything less responsive.
Comment 3 mogliii 2012-08-20 19:04:44 UTC
I feel honoured ^^

Michel Ludwig wrote:
"Alternatively, we could only trigger a sync whenever the line of the cursor changes. Currently, this is done on every key stroke, and this might make everything less responsive."

Is this a suggestion or is it already implemented? But that might do the trick. Synctex anyway only works for paragraphs, doesn't it?

I will compile when I have time and see if it makes any difference.
Comment 4 Michel Ludwig 2012-08-20 19:44:12 UTC
(In reply to comment #3)
> Is this a suggestion or is it already implemented? But that might do the
> trick. Synctex anyway only works for paragraphs, doesn't it?

It's not implemented yet but I'll try to do that soon. If I remember correctly, Synctex would even work for line + column cursor positions, but OkularPart only considers the lines at the moment.
Comment 5 Michel Ludwig 2012-09-18 20:02:25 UTC
Git commit 8346295484bd489f752593c171f1a15c47d02053 by Michel Ludwig.
Committed on 18/09/2012 at 21:58.
Pushed by mludwig into branch 'master'.

Only synchronize the cursor position when the cursor line has changed

This only applies to actual changes in the cursor position and not when re-synchronizing
after a compilation, for example.

M  +20   -3    src/livepreview.cpp
M  +3    -1    src/livepreview.h

http://commits.kde.org/kile/8346295484bd489f752593c171f1a15c47d02053
Comment 6 Michel Ludwig 2012-09-18 20:02:56 UTC
How is the performance on your machine now?
Comment 7 mogliii 2012-09-19 17:36:24 UTC
I just compiled and opened my large document. I could not reproduce the performance lags described in the video. As long as I stay in the same line, KATE is very responsive.

I will work again with large documents in two weeks and will re-open in case I notice any performance issues I did not notice now.

Thank you for the fix!