You are not logged in.

#1 2021-03-13 11:36:08

Svitozhar
Member
Registered: 2021-03-13
Posts: 19

LibreOffice is lagging while handling large spreadsheets

Hello there!
I'm quite new Arch user and I'm happy with the system and its simplistic philosophy. Nevertheless, from time to time I find some lags or strange program behavior. One of the most annoying things to date is libreoffice lags and long response time while opening and working with big table files. I work a lot with this type of files, so I can't avoid the frustration it can cause some time. I tried different solutions: re-installing, defaulting settings, trying "still" version instead of "fresh" etc. The only thing that helped was switching to .appimage version from official libreoffice web-site. Now I'm curios, why .appimage's working marvelously and arch-packaged version has problems?

You can repeat it by downloading large spreadsheet, e.g. 'Scopus source list' from https://www.scopus.com/. When I try to open this file, I have to wait 1-2 mins before any new operation with table. On other hand, .appimage opens file and I can work flawlessly with the file. The only difference I noticed is 'splash-pipe' parameter in htop: arch-version has it 5 and .appimage has 6.

Do you have any idea how to fix lags in arch-version?

Offline

#2 2021-03-13 16:12:37

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: LibreOffice is lagging while handling large spreadsheets

That file loads in ~20 seconds on my machine using libreoffice-fresh 7.1.1-1
Is your system fully up to date? What hardware are you using?
Perhaps post a full

journal -b

so we can get some background.

Last edited by paulkerry (2021-03-13 16:13:06)

Offline

#3 2021-03-13 16:32:45

finoderi
Member
Registered: 2020-06-12
Posts: 76

Re: LibreOffice is lagging while handling large spreadsheets

It took about 15 seconds to open the file in all its glory. Same 7.1.1-1 'native' version.
I would try to

$ libreoffice '/path/to/the/file'

and look for some useful output.

Offline

#4 2021-03-13 20:43:00

Svitozhar
Member
Registered: 2021-03-13
Posts: 19

Re: LibreOffice is lagging while handling large spreadsheets

Thank you for quick reaction!
I have PC with AMD FX-6300 and 8 G RAM. Also I use SSD.

Everything is up-to-date through 'sudo pacman -Syu'

my journal is here: https://pastebin.com/8unt6KZg

finoderi wrote:

I would try to

$ libreoffice '/path/to/the/file'

and look for some useful output.

I see nothing in terminal while opening and navigating (through pain and lags). Only htop shows 100% load on 1 core. It reminds me bad old time on WinXP: try to open smth big and wait till eternity for response...

Last edited by Svitozhar (2021-03-13 21:04:35)

Offline

#5 2021-03-13 22:04:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: LibreOffice is lagging while handling large spreadsheets

There's apparently a bug in threaded calculations, https://bbs.archlinux.org/viewtopic.php … 6#p1960786
No idea whether it could also cause this lag, but hey - it's multithreading ;-)

Last edited by seth (2021-03-13 22:10:49)

Offline

#6 2021-03-14 13:26:20

Svitozhar
Member
Registered: 2021-03-13
Posts: 19

Re: LibreOffice is lagging while handling large spreadsheets

seth wrote:

There's apparently a bug in threaded calculations, https://bbs.archlinux.org/viewtopic.php … 6#p1960786
No idea whether it could also cause this lag, but hey - it's multithreading ;-)

On/off multithreading gives no help to my problem. I suppose some lib in .appimage and installed in my system are different version and makes a difference.

Offline

#7 2021-03-14 14:11:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: LibreOffice is lagging while handling large spreadsheets

I suppose the entire appimage has not much in common with the distro version, but why would your version differ from paulkerry's and finoderi's?
You could strace or gdb libreoffice a bit to see what it's doing when it's occupying one of your cores (assuming the appimage version does not show that behavior).

Offline

#8 2021-03-14 18:10:56

Svitozhar
Member
Registered: 2021-03-13
Posts: 19

Re: LibreOffice is lagging while handling large spreadsheets

seth wrote:

I suppose the entire appimage has not much in common with the distro version, but why would your version differ from paulkerry's and finoderi's?
You could strace or gdb libreoffice a bit to see what it's doing when it's occupying one of your cores (assuming the appimage version does not show that behavior).

Can you suggest me some key for strace? And overall some manual for this program. The general output is huge, I don't know what to look for. Even how to save output...

Offline

#9 2021-03-14 18:57:23

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: LibreOffice is lagging while handling large spreadsheets

I'm not using a zen kernel, just the latest linux package 5.11.6.arch1-1.
I'm just wondering if your CPU frequency is stuck at a low value? You have a faster CPU than I do. Is your system slow in general or is it just libreoffice?
Unless you've enabled the "Also show CPU frequency" option, htop would just normally show you a CPU is peaking, not what speed it is peaking at.
You could try loading the file again directly from the command line as @finoderi suggests, while at the same time doing something like...

cat /proc/cpuinfo |grep -i mhz

or...

cpupower -c all frequency-info

Last edited by paulkerry (2021-03-14 18:58:16)

Offline

#10 2021-03-14 19:36:36

Svitozhar
Member
Registered: 2021-03-13
Posts: 19

Re: LibreOffice is lagging while handling large spreadsheets

paulkerry wrote:

I'm not using a zen kernel, just the latest linux package 5.11.6.arch1-1.
I'm just wondering if your CPU frequency is stuck at a low value? You have a faster CPU than I do. Is your system slow in general or is it just libreoffice?
Unless you've enabled the "Also show CPU frequency" option, htop would just normally show you a CPU is peaking, not what speed it is peaking at.
You could try loading the file again directly from the command line as @finoderi suggests, while at the same time doing something like...

cat /proc/cpuinfo |grep -i mhz

or...

cpupower -c all frequency-info

My PC is fast and responsive. I've overclocked it to 4.4 GHz and 2133 MHz for RAM. It's first time I noticed some program operates slow or laggy in 6 months. This is the reason I ask for help: everything is flying fast but libreoffice can't handle large files. Btw, .appimage-version opens this file in 20-30 secs, as you suggest. Just 'native' arch-version has it's 1-2 mins lags in-between any operation with spreadsheet...

Offline

#11 2021-03-14 20:06:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: LibreOffice is lagging while handling large spreadsheets

strace -f libreoffice '/path/to/the/file' > ~/thisisgonnabehuge.txt 2>&1

"-f" will dive into subprocesses which is required since libreoffice is afair a script around soffice.bin

Offline

#12 2021-03-14 20:43:06

Svitozhar
Member
Registered: 2021-03-13
Posts: 19

Re: LibreOffice is lagging while handling large spreadsheets

seth wrote:
strace -f libreoffice '/path/to/the/file' > ~/thisisgonnabehuge.txt 2>&1

"-f" will dive into subprocesses which is required since libreoffice is afair a script around soffice.bin

Thank you!
I made a dig but don't know how to analyze it properly.

Can someone help me with it? What to look for? I add the strace's hisisgonnabehuge.txt.

Offline

#13 2021-03-14 20:58:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: LibreOffice is lagging while handling large spreadsheets

From a  superficial look it seems to spend a lot of time waiting for and talking to the X11 server, so let's start there: post your xorg log.

Offline

#14 2021-03-16 11:47:56

Svitozhar
Member
Registered: 2021-03-13
Posts: 19

Re: LibreOffice is lagging while handling large spreadsheets

seth wrote:

From a  superficial look it seems to spend a lot of time waiting for and talking to the X11 server, so let's start there: post your xorg log.

How interesting it gets... My X.org log is here (I hope I got it right what is needed to be provided).

Offline

#15 2021-03-16 12:41:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: LibreOffice is lagging while handling large spreadsheets

Replace "amdgpu.dpm=1" in the kernel commandline w/

amdgpu.dc=0 amdgpu.audio=0 amdgpu.dpm=0 amdgpu.aspm=0 amdgpu.runpm=0 amdgpu.bapm=0

See what happens.

You may also try to

export LIBGL_ALWAYS_SOFTWARE=true
export GALLIUM_DRIVER=llvmpipe

in the shell you're running libreoffice from.

Offline

#16 2021-03-16 14:06:54

Svitozhar
Member
Registered: 2021-03-13
Posts: 19

Re: LibreOffice is lagging while handling large spreadsheets

seth wrote:

Replace "amdgpu.dpm=1" in the kernel commandline w/

amdgpu.dc=0 amdgpu.audio=0 amdgpu.dpm=0 amdgpu.aspm=0 amdgpu.runpm=0 amdgpu.bapm=0

See what happens.

You may also try to

export LIBGL_ALWAYS_SOFTWARE=true
export GALLIUM_DRIVER=llvmpipe

in the shell you're running libreoffice from.

Nah, nothing changed. New Xorg.

Offline

#17 2021-03-16 21:11:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: LibreOffice is lagging while handling large spreadsheets

Meh.
Sanity check: if you create a new user account, log in as that user and open libreoffice there: still slow?

Offline

#18 2021-03-17 12:14:33

Svitozhar
Member
Registered: 2021-03-13
Posts: 19

Re: LibreOffice is lagging while handling large spreadsheets

seth wrote:

Meh.
Sanity check: if you create a new user account, log in as that user and open libreoffice there: still slow?

Lol, under new user all is operable. Still some lags are present but I can view a document and work with it content. So what can be wrong with my main account?

Offline

#19 2021-03-17 12:22:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: LibreOffice is lagging while handling large spreadsheets

Some libreoffice configuration.
Try to move away ~/.config/libreoffice eg. to ~/.config/not.libreoffice (make sure LO isn't running while doing so to not accidentally carry over the config)
Which one in particular is hard to say this way but wildly guessing: LO has HW acceleration support, that might be a difference. Also the GUI theme/style might be at play.

Offline

#20 2021-03-17 14:14:02

Svitozhar
Member
Registered: 2021-03-13
Posts: 19

Re: LibreOffice is lagging while handling large spreadsheets

seth wrote:

Some libreoffice configuration.
Try to move away ~/.config/libreoffice eg. to ~/.config/not.libreoffice (make sure LO isn't running while doing so to not accidentally carry over the config)
Which one in particular is hard to say this way but wildly guessing: LO has HW acceleration support, that might be a difference. Also the GUI theme/style might be at play.

Eh... I did it and it worked. Excuse me for my newbie approach for re-installing. I completely forgot to delete/move/rename folder in ~/.config. I don't know what setting or extension caused my problem but vanilla setting works flawlessly.
Thank you for help.

Offline

#21 2021-03-17 14:47:58

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,550

Re: LibreOffice is lagging while handling large spreadsheets

Unfortunately it's a very complex config system… but if you had some extension(s) you probably want to re-add them and checking the behavior after each addition might get you there.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB