Bug 61471 - Template Manager: in 4.0 is very slow
Summary: Template Manager: in 4.0 is very slow
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Template-Manager
  Show dependency treegraph
 
Reported: 2013-02-26 00:05 UTC by S.
Modified: 2020-05-20 12:47 UTC (History)
5 users (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 S. 2013-02-26 00:05:37 UTC
Hi everyone, 

I usually use the Template Manager to start new Writer documents. I always use my own custom templates under "My Templates". There is a regression in the Template Manager in 4.0 It is very slow to load. The Template Manager takes at least 2 seconds to appear each time after clicking "Templates" button. I imagine this is because of the new template thumbnails. I would appreciate an option to turn off the thumbnails, or possibly implement caching of the thumbnails for subsequent openings of the Template Manager.

The Template Manager in 3.x was very fast on the same system.

Thanks for looking into this.


Operating System: openSUSE
Version: 4.0.0.3 release
Last worked in: 3.6.5.2 release
Comment 1 Joel Madero 2013-02-26 03:01:04 UTC
adding Astron to this as he may have some feedback
Comment 2 Stefan Knorr (astron) 2013-02-26 08:39:00 UTC
I believe we already know about this – there was some performance regression when you had a decently large number of templates. Adding Cedric, maybe he knows if this is a dupe and maybe already fixed..?

I only found this on the mailing list:
http://lists.freedesktop.org/archives/libreoffice-ux-advise/2013-January/001724.html

(Setting to NEW because of Alex Thurgood's similar experience.)

...

At the same time, turning thumbnails off sounds like a less-than-great solution to me, since they are quite important in the new template manager. And once you introduce an option, there is often no turning back even if the situation betters significantly.
Comment 3 S. 2013-02-26 09:11:57 UTC
I have six templates, plus the default ones that come with LibO, if this helps. 

The slowness pretty much ruins the template usage experience, though. :(

Thanks for looking into this.
Comment 4 Stefan Knorr (astron) 2013-02-26 10:57:05 UTC
Hi S.,

six extra templates doesn't sound like very much... Are these templates very large? Are they stored somewhere special (network/...)?
Comment 5 S. 2013-02-26 12:01:33 UTC
Hi Astron,

It's nothing out of the ordinary. All of the templates are under 20 kB, most far less. All are located in my LiBO profile folder in my home directory on the local disk.

Thanks for looking into this!
Comment 6 Cor Nouws 2013-05-10 09:50:50 UTC
@ s.
Have you been able to try with a recent version?
Or with a fresh user profile?
thanks,
Comment 7 S. 2013-05-10 13:38:16 UTC
(In reply to comment #6)
> @ s.
> Have you been able to try with a recent version?
> Or with a fresh user profile?
> thanks,

Hi there. No, I went back to LibO 3.6, mainly because of this bug. Have any changes been made to the performance aspect of the template manager code? If so, I'd be glad to give it a try.
Comment 8 Cor Nouws 2013-05-10 14:15:41 UTC
(In reply to comment #7)
> Hi there. No, I went back to LibO 3.6, mainly because of this bug. Have any
> changes been made to the performance aspect of the template manager code? If
> so, I'd be glad to give it a try.

I strongly doubt that there are general problems with the preformance of the template manager.
Haven't seen any reports / heard any complaints other then this one ;-)

So unless we are able to fiddle what is going on in your situation, I'm afraid we can't help.
Comment 9 S. 2013-05-10 17:26:43 UTC
Hi Cor,

Thanks for the suggestion. I'm now on 4.0.2 on openSUSE 12.3, and the 
performance of the "My Templates" folder is indeed much better now. I 
tried it with a clean profile and also with a profile converted from 
LibO 3.x, and "My Templates" opens and renders almost immediately on a 
cold start. Good to see this improvement.

However, I still would like to leave this bug open, because the Template 
Manager itself still takes too long to open. For me it takes over 3 
seconds. My processor isn't exactly fast (1.4 GHz Intel Core 2 Solo) but 
with 4GB of RAM and given that the OS is pretty light and well 
maintained, I would like a feature as frequently accessed as the 
Template Manager to open immediately. It still seems like some sort of 
caching could be implemented to improve rendering time. And maybe when 
4.0.3 is available for openSUSE it will remember the last folder opened 
in the Template Manager and open directly to My Templates and reduce the 
loading time more.
Comment 10 Cor Nouws 2013-05-10 21:54:06 UTC
Hi S,

(In reply to comment #9)

> [...] and the 
> performance of the "My Templates" folder is indeed much better now. 

> [...] the Template 
> Manager itself still takes too long to open. For me it takes over 3 
> seconds.

Can you pls explain to me what the difference is between those two :-) ?

thanks a lot,
Comment 11 S. 2013-05-10 23:08:22 UTC
>> performance of the "My Templates" folder is indeed much better now.
>
>> [...] the Template
>> Manager itself still takes too long to open. For me it takes over 3
>> seconds.
>
> Can you pls explain to me what the difference is between those two :-) ?

Sure. ;) The Template Manager is what appears when opening 
File->New->Templates. Inside the Template Manager there are a bunch of 
categories, one of which is the "My Templates" directory inside the user 
profile directory. When I first opened this bug, my main complaint was 
that it took like more than like 8 seconds just to open the "My 
Templates" category. That part is now fixed. But File->New->Templates 
still takes way too long to open the Template Manager and display the 
root listing of all the template categories.
Comment 12 Cor Nouws 2013-05-12 10:49:29 UTC
thanks for clarifying this!
And since I like asking questions ;-) : 

a. Is the opening of the template manager so slow every time or only the first time in a session?
(I have about the same system specs, and for me it's absolutely less then one second.)
b. Could it be that you have network stored places for your templates?
(Maybe handling of that has changed..)
c. Did you try with a fresh user profile?
Comment 13 S. 2013-05-12 12:27:38 UTC
> *Comment # 12 <https://bugs.freedesktop.org/show_bug.cgi?id=61471#c12>
> on bug 61471 <https://bugs.freedesktop.org/show_bug.cgi?id=61471> from
> Cor Nouws <mailto:cno@nouenoff.nl> *
>
> thanks for clarifying this!
Sure, thanks very much for taking the time to look into this.

> a. Is the opening of the template manager so slow every time or only the first
> time in a session?
Every time almost exactly the same, around 3.17 seconds.

> b. Could it be that you have network stored places for your templates?
No, all on the local disk.

> (Maybe handling of that has changed..)
> c. Did you try with a fresh user profile?
Yes, I started fresh with LibreOffice 4.


Please let me know if I can help with any other information.
Thanks a lot!
Comment 14 Cor Nouws 2013-05-12 17:32:24 UTC
(In reply to comment #13)

> > c. Did you try with a fresh user profile?
> Yes, I started fresh with LibreOffice 4.

It's not about LibreOffice itself, but about this:
  https://wiki.documentfoundation.org/UserProfile
Comment 15 S. 2013-05-12 23:35:44 UTC
> It's not about LibreOffice itself, but about this:
>    https://wiki.documentfoundation.org/UserProfile

Yep, sorry, that's what I was referring too. I renamed my profile folder 
and started with a fresh profile when I moved to LibreOffice 4.
Comment 16 S. 2013-05-16 21:27:19 UTC
Quick update: I just updated to 4.0.3, and the Template Manager now 
remembers the last opened template directory, which is really nice. But 
the Template Manager still takes about 2.8 seconds to appear on a warm 
or cold start.
Comment 17 retired 2014-01-11 08:25:06 UTC
S. and others: Could someone check, if this is still reproducible with 4.2.0.1: http://www.libreoffice.org/download/pre-releases/

I don’t use any templates so unsure if I’d see this problem.
Comment 18 Cor Nouws 2014-01-11 14:17:38 UTC
(In reply to comment #17)
> S. and others: Could someone check, if this is still reproducible with
> 4.2.0.1: http://www.libreoffice.org/download/pre-releases/

It's a bit more then one second for me. But I never had the problem that S has.
Comment 19 Cédric Bosdonnat 2014-01-20 09:00:24 UTC
Restricted my LibreOffice hacking area
Comment 20 Cor Nouws 2014-02-03 20:48:52 UTC
Hi,

Cleaning up the Template manager stuf and setting this as WorksForMe.
Comment 21 Ray123 2014-02-11 06:29:20 UTC
In our Network (Windows) the template manager needs about one minute to start up. This problem occured with the first version of LO 4.x and still exist in 4.2. If we open other documents, the network loading is fast.
Comment 22 Alex Thurgood 2016-08-10 08:25:45 UTC
So I am re-opening this because I have been experiencing this problem since that discussion back in January 2013 in the mail archives, and unfortunately it hasn't gone away.

Testing with 

Version: 5.3.0.0.alpha0+
Build ID: 3a668616968dbce778c54ec56847828efa7bdb6d
CPU Threads: 2; OS Version: Mac OS X 10.11.6; UI Render: default; 
Locale: fr-FR (fr.UTF-8); Calc: group

I have this built with the switch --enable-extra-template, which installs approximately 1200 templates in all.

When I click on the Templates button in StartCenter, it takes more than 1 minute to do anything - in the meanwhile, LO just sits there, both the Recent Documents and the Templates buttons are shown as selected, and the OSX system cursor turns into a spinning "beachball".

Note that the installed templates are all local, not even over a network.

The time taken to complete display of the templates in the preview window is systematically in excess of 1 minute (between 1min 30 and 1min 15).

I will test this over a LAN network setup too, and will report back.
Comment 23 Yousuf Philips (jay) (retired) 2016-08-10 21:28:04 UTC
So i tested it with --enable-extra-template and with a cleared profile it takes 30 seconds the first time the template button is pressed, while other times it takes 10 seconds. My laptop is a i5 3rd generation with 4gb ram.
Comment 24 Alex Thurgood 2016-08-11 13:16:28 UTC
Testing on

Version: 5.3.0.0.alpha0+
Build ID: 1015d35f2362953f415804476037d4f162eb49b5
Threads CPU : 4; Version de l'OS :Linux 4.4; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group

Linux Mint 18 
Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
8Gb RAM
Heathrow PRO [Radeon HD 7850M/8850M] graphics

Time to initial display of template previews with extra templates installed : 24s
Comment 25 Alex Thurgood 2016-08-11 13:20:06 UTC
My OSX builds and testing are carried out on :

Mac mini Server (mi-2010)
2,66 GHz Intel Core 2 Duo
4 Go 1067 MHz DDR3
NVIDIA GeForce 320M 256 Mo

Our code shouldn't be penalizing duo core / lower RAM specced systems in this way.
Comment 26 Alex Thurgood 2016-08-11 13:29:14 UTC
LOL, spoke too soon, looks like OSX systems get the raw deal. Just tested on :

Macbook Pro (Retina, 15", end 2013)
2.6 Ghz Intel Core i7 (8 cores)
16 Gb RAM
NVIDIA GeForce GT 750M 2048Mb

Time to initial display of template preview : 50s !
Comment 27 Alex Thurgood 2016-08-11 13:32:35 UTC
Is the code optimized for Linux OS and not the other OSes we build for ?
Comment 28 Yousuf Philips (jay) (retired) 2016-08-12 15:32:14 UTC
Lets return this back to WFM as it was about the option to disabling thumbnails in 4.0. I've opened a separate bug to deal with the slow loading of thumbnails (bug 101467).