Bug Hunting Session
Bug 104802 - Performance - jerky cursor behavior, lags key strokes, 500mb memory use
Summary: Performance - jerky cursor behavior, lags key strokes, 500mb memory use
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.3.3 release
Hardware: x86-64 (AMD64) Mac OS X (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, perf, regression
Depends on:
Blocks: MacOS-Performance
  Show dependency treegraph
 
Reported: 2016-12-20 05:10 UTC by Steve Nordstrom
Modified: 2018-03-08 12:19 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Spreadsheet with jerky cursor (93.83 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-12-21 16:07 UTC, Steve Nordstrom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Nordstrom 2016-12-20 05:10:59 UTC
Description:
The last two versions of LO have been horrible.
Cursor movements are jerky, laggy.
LO NEVER shuts down when I restart my computer - it must be forced to quit.
The column filter lost 900 rows of data on a 1000 row spreadsheet.


Steps to Reproduce:
1.open any spreadsheet
2.edit any cells
3.cursor is jerky, not smooth movement.


Actual Results:  
No special steps.
Any edits - add a number to a blank cell, change a number, enter formula, any action.
the more edits the more sluggish the cursor and response of the application.
Saving does not help.


Expected Results:
This application did not act like this in previous revisions.
What did you do to break it?


Reproducible: Always

User Profile Reset: No
Single user machine.

Additional Info:
This is a mac mini computer with 8GB of RAM.
It never has less than 2GB of RAM available for this application.
My spreadsheets are each less than 200KB.



User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
Comment 1 Buovjaga 2016-12-20 20:00:19 UTC
On one hand you talk of using filters, on the other you say "No special steps". I take it the filter stuff is just something you wanted to mention and no test case is needed. If so, there is indeed something special in your system.

You should try this first: https://wiki.documentfoundation.org/UserProfile#Resolving_corruption_in_the_user_profile

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists after profile reset. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 2 Steve Nordstrom 2016-12-21 03:23:37 UTC
This is a single user machine.
It is an Apple macintosh not a Window$ machine.
There is no user profile that I know of.
My comment about the filter is taken up in detail in another bug report.
I was only noting that there are several problems with this version of this software.

Re - "No special steps"
I guess this depends on what you consider "special".
Pulling down the Data menu and selecting a feature named "AutoFilter" is not something I consider "special".
Maybe I misunderstand your terminology.
There are certainly no special steps required to move the cursor from one cell to another and enter/change data therein.

Following the instructions in the link provided is a dead end.
There is no user profile file in my computer.
There is no "system tray" on an Apple computer.
There is no "restart in safe mode" option in the LO Help menu.
I have not tried the "safe mode" start up yet.
How do I find a User Profile in Libre Office in a Mac?
There is no "Options" entry in the "Tools" menu, as stated in the link instructions to find the User Profile.
This is what I get in terminal mode ...

Steves-Mac-mini:~ Steve$ /users/Steve/Library/Application Support/LibreOffice/4/user
-bash: /users/Steve/Library/Application: No such file or directory
Steves-Mac-mini:~ Steve$ cd /users/Steve/Library/Application Support/LibreOffice/4/user
-bash: cd: /users/Steve/Library/Application: No such file or directory
Steves-Mac-mini:~ Steve$ 
So I cannot/have not reset my user profile yet.
Help me help you.
Comment 3 Buovjaga 2016-12-21 09:07:17 UTC
(In reply to Steve Nordstrom from comment #2)
> Re - "No special steps"
> I guess this depends on what you consider "special".
> Pulling down the Data menu and selecting a feature named "AutoFilter" is not
> something I consider "special".
> Maybe I misunderstand your terminology.
> There are certainly no special steps required to move the cursor from one
> cell to another and enter/change data therein.

Ok, then please attach an example file.

> Steves-Mac-mini:~ Steve$ /users/Steve/Library/Application
> Support/LibreOffice/4/user
> -bash: /users/Steve/Library/Application: No such file or directory
> Steves-Mac-mini:~ Steve$ cd /users/Steve/Library/Application
> Support/LibreOffice/4/user
> -bash: cd: /users/Steve/Library/Application: No such file or directory
> Steves-Mac-mini:~ Steve$ 
> So I cannot/have not reset my user profile yet.
> Help me help you.

It seems to be tripping over the space between Application and Support.

Try with quotes:
cd "/users/Steve/Library/Application Support/LibreOffice/4/user"

I guess you could also go there in Finder and rename there..
Comment 4 Alex Thurgood 2016-12-21 09:26:10 UTC
(In reply to Steve Nordstrom from comment #2)


> How do I find a User Profile in Libre Office in a Mac?

The user profile is stored in 

/Users/username/Library/Application Support/LibreOffice


Rename this to LO_Old (from the terminal, as indicated below, or else via the Finder GUI):

mv /Users/username/Library/Application Support/LibreOffice /Users/username/Library/Application Support/LO_Old

Restart LibreOffice - a new user profile will be created.
Comment 5 Alex Thurgood 2016-12-21 09:39:54 UTC
Lagging is currently known to occur under certain circumstances in Draw, see bug 104312.

Performance issues are also known in Calc with bug 63475.

There is another bug that mentions performance issues in Calc when the spreadhseet contains many Notes/Comments.

Most of these Calc-specific bugs are refresh/re-calculation related - i.e. where changes are made to the spreadsheet, and as a result automatic recalculation is triggered, then this impacts performance quite heavily (or at least, that is what I'm reading from the above Calc bug reports).

This might be the reason why you are experiencing the behaviour you report, but without a test file, we can't do much else to verify.
Comment 6 Steve Nordstrom 2016-12-21 16:07:13 UTC
Created attachment 129850 [details]
Spreadsheet with jerky cursor

I do not know how to provide step by step instructions to move the cursor left to right or side to side other than write, press one of the arrow keys.
If you hold down one of the arrow keys the jerkiness of the cursor becomes more pronounced.
The markers in the column and row identifiers do not move with the cursor, like they did two or three revisions past.
The cursor in column A moves up and down in two sections.
This drives me crazy.

There are no notes or comments in my spreadsheets.
There are a lot of recalculations going on in this spreadsheet. (3000-4000+)
However, there were no performance problems with my spreadsheets in version 4.
Something changed inside in version 5.2.

I am not having any success finding/changing my user profile - still working on it.

SN
Comment 7 Alex Thurgood 2016-12-23 08:45:23 UTC
@Steve : I also see jerkiness in Apple's Preview when I select some text for copying from a PDF - this appears to be an Apple problem. That's not to say that what you say isn't specific to LibreOffice, it might well be, but jerkiness certainly isn't unique to LibreOffice.


To find your user profile:

Shift-Cmd-G 

type in :

/Users/myuser/Library/Application Support

and replace myuser with the name of the user account.
Comment 8 Alex Thurgood 2016-12-23 09:01:59 UTC
Used test file with

Version: 5.2.3.3
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
Threads CPU : 2; Version de l'OS :Mac OS X 10.12.2; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group

No repro
I can not reproduce the jerky cursor movements, whether by simply using the cursor keys to navigate from one cell to another (up/down/left/right) or when entering a cell for editing its content. I can edit a value in a cell without any noticeable slowdown or jerkiness.

My test system is also pretty old : 
Mac-mini mid-2010
Processor : 2,66 GHz Intel Core 2 Duo
Memory : 4 Go 1067 MHz DDR3
Graphics : NVIDIA GeForce 320M 256 Mo
OSX 10.12.2
Comment 9 steve -_- 2017-01-08 12:37:21 UTC
Tested in Version: 5.4.0.0.alpha0+
Build ID: 575e222a1742918be052f2b716ddf57ce0008404
CPU Threads: 4; OS Version: Mac OS X 10.12.2; UI Render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2017-01-05_23:52:52
Locale: de-DE (de_DE.UTF-8); Calc: group

Cannot reproduce.

Please reset your user profile: https://wiki.documentfoundation.org/UserProfile#Resolving_corruption and see if the problem then persists.

Setting to NEEDINFO until more detail is provided.

After providing the requested info, please reset this bug to UNCONFIRMED (should it be persisting) or WORKSFORME (should it be solved with a newer LO version).
Comment 10 Steve Nordstrom 2017-01-10 17:09:00 UTC
Re Comment 7
I typed in the characters give in your comment.
Nothing happened.
First try, it opened a box in my browser link bar.
pressing Enter after entering the characters given produced nothing.
I went to Terminal and entered the same characters, which produced this.....

Steves-Mac-mini:~ Steve$ :/Users/Steve Nordstrom/Library/Application Support
-bash: :/Users/Steve: No such file or directory
Steves-Mac-mini:~ Steve$ :/Users/Steve Nordstrom/Library/Application Support
-bash: :/Users/Steve: No such file or directory
Steves-Mac-mini:~ Steve$ 

Entering this string in Finder produced no results - nothing.

Entering the suggested string in Comment 4 with quotation marks.
-bash: cd: /Users/Steve/Library/Application Support/LibreOffice/4/user: No such file or directory
Steves-Mac-mini:~ Steve$ 


Ready to give up
Comment 11 Buovjaga 2017-01-10 17:31:48 UTC
(In reply to Steve Nordstrom from comment #10)
> Ready to give up

Well, LibreOffice 5.3 makes this quite a bit easier. New documentation regarding this is here: https://wiki.documentfoundation.org/UserProfile#Resolving_corruption

You can grab a release candidate of 5.3 here: http://www.libreoffice.org/download/pre-releases/
Comment 12 Alex Thurgood 2017-01-11 08:59:46 UTC
(In reply to Steve Nordstrom from comment #10)
>

> Ready to give up

From a terminal :

chflags nohidden ~/Library

You may be required to enter your admin password to do this.

By default (for alleged security reasons), OSX hides the user's /Library folder. The above command unhides it.


Alex
Comment 13 Alex Thurgood 2017-01-11 09:04:42 UTC
(In reply to Buovjaga from comment #11)
> (In reply to Steve Nordstrom from comment #10)


> Ready to give up

http://www.macworld.com/article/2057221/how-to-view-the-library-folder-in-mavericks.html
Comment 14 Steve Nordstrom 2017-01-16 15:42:08 UTC
Still no success in finding or fixing my User Profile.
Note this....
In going to Steve's Mac Mini>Library>Application Support  LibreOffice is not listed.
LO is listed in Applications.

Could this be the problem?
Comment 15 Buovjaga 2017-01-16 17:43:24 UTC
(In reply to Buovjaga from comment #11)
> Well, LibreOffice 5.3 makes this quite a bit easier. New documentation
> regarding this is here:
> https://wiki.documentfoundation.org/UserProfile#Resolving_corruption
> 
> You can grab a release candidate of 5.3 here:
> http://www.libreoffice.org/download/pre-releases/

Again, why not try 5.3 and the new Safe mode feature? This way you would not have to know where the profile resides.
Comment 16 tommy27 2017-01-25 11:05:34 UTC
please retest and give feedback following Buovjaga advice.

status NEEDINFO until then
Comment 17 Steve Nordstrom 2017-03-03 01:07:05 UTC
Per your suggestion I have installed LO 5.3.0.
It changed nothing.
I tried several times to enter Safe Mode and the reaction of my computer did not match the instructions, so I could not complete the process, so I gave up.

I keep two 1000+ line spreadsheets open for days/weeks at a time.
I enter small amounts of data (30 cells or less) on one or both of them almost every day.
As the days pass, I have noticed that the amount of memory used by LO grows several megabytes each day.
Even though each spreadsheet is listed as 100KB or so, the amount of memory shown used by LO grows from about 200 MB at opening, to over 1GB after a week or two.
WHY?
Is there some setting that I can adjust to reduce memory usage?
This may be the reason for the cursor lag.
Comment 18 Buovjaga 2017-03-03 07:08:16 UTC
(In reply to Steve Nordstrom from comment #17)
> Per your suggestion I have installed LO 5.3.0.
> It changed nothing.
> I tried several times to enter Safe Mode and the reaction of my computer did
> not match the instructions, so I could not complete the process, so I gave
> up.

Can you give more details on how it did not match? Were you able to: Help - Restart in safe mode and then Continue in safe mode without doing anything else? Note that you should ignore all the radio buttons and simply click the Continue in safe mode.
Comment 19 Alex Thurgood 2017-03-17 10:06:50 UTC
(In reply to Steve Nordstrom from comment #17)


> I keep two 1000+ line spreadsheets open for days/weeks at a time.
> I enter small amounts of data (30 cells or less) on one or both of them
> almost every day.
> As the days pass, I have noticed that the amount of memory used by LO grows
> several megabytes each day.
> Even though each spreadsheet is listed as 100KB or so, the amount of memory
> shown used by LO grows from about 200 MB at opening, to over 1GB after a
> week or two.
> WHY?

Probably because the app is consuming RAM through either leaking, over zealous allocation or repeated and useless thread spawning, but finding the cause requires more precise information.


> Is there some setting that I can adjust to reduce memory usage?

Probably not.

> This may be the reason for the cursor lag.


It might be the symptom, but not the cause.

I am setting this to new, in line with bug 104031
Comment 20 Alex Thurgood 2017-03-17 10:12:34 UTC
Version: 5.3.0.3
Build ID: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
Threads CPU : 2; Version de l'OS :Mac OS X 10.12.3; UI Render : par défaut; Moteur de mise en page : nouveau; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group

Using test file provided by Steve.


Initial cursor movement up or down or sideways takes more than 1 second - there is a noticeable lag.

The file also takes a very long time to open on my mid2010 Mac mini, more than a minute, once LibreOffice has started and displayed the StartCenter.
Comment 21 Michael Meeks 2018-03-01 16:20:57 UTC
Hi Alex - ooh; this is interesting, and perhaps mis-prioritized ... Tor - I wonder if you could take a look at this one; my hope is that some simple profiling even in the debugger might show what's going on here ...
Comment 22 Tor Lillqvist 2018-03-05 12:10:01 UTC
Sorry, I could not notice any particular jerkiness or lags when moving around in the attached document, on a Late 2012 Mac Mini (the slowest Mac I have) running the latest macOS, in the latest LibreOffice (6.0.2) from TDF.
Comment 23 Tor Lillqvist 2018-03-05 12:13:17 UTC
The document opens in one or two seconds, and initially the cell cursor is in cell B23 which isn't initially visible (scrolled out of view), so it takes perhaps half a second for the display to update when first moving the cursor one cell in some direction with an arrow key.
Comment 24 Alex Thurgood 2018-03-05 13:26:13 UTC
No repro for me with


Version: 6.1.0.0.alpha0+
Build ID: 9122f4598450d8a96e63fb29cc8166a6ae09587a
CPU threads: 4; OS: Mac OS X 10.13.3; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group


this is my own master build from 2/3 days ago (Thur/Fri 01/03 or 02/03)
Comment 25 Xisco Faulí 2018-03-08 12:19:21 UTC
@Alex, Do you reproduce it in 6.0 ?

I can't reproduce it in

Version: 6.0.2.1
Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
CPU threads: 8; OS: Mac OS X 10.13.3; UI render: default; 
Locale: en-US (en_ES.UTF-8); Calc: group

either