Bug 480901 - "Configure Okular" window under "Settings" menu is slow to open
Summary: "Configure Okular" window under "Settings" menu is slow to open
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 23.08.4
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-05 14:23 UTC by Massimiliano L
Modified: 2024-03-06 11:39 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Hotspot analysis (184.04 KB, image/avif)
2024-02-05 14:49 UTC, Nicolas Fella
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Massimiliano L 2024-02-05 14:23:43 UTC
SUMMARY
The "Configure Okular..." window accessible from the "Settings" menu takes in the order of seconds to open. Same happens when accessing it through other buttons, such as "Configure Annotations". 

This is observed on a fairly well-powered desktop PC with loads of free RAM.

STEPS TO REPRODUCE
1. open Okular
2. click on Settings -> "Configure Okular..."

OBSERVED RESULT
About 3+ seconds of Okular not doing anything before the configuration window shows.

EXPECTED RESULT
Opening of configuration window should be almost instantaneous.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 39
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.113.0
Qt Version: 5.15.12
Comment 1 Nicolas Fella 2024-02-05 14:49:23 UTC
Created attachment 165568 [details]
Hotspot analysis

Slowness seems to come from initializing text-to-speech stuff
Comment 2 Albert Astals Cid 2024-02-06 20:28:32 UTC
Jeremy any idea?
Comment 3 Jeremy Whiting 2024-02-06 21:31:52 UTC
That looks like spd_list_voices is taking a while. I'm willing to bet money they have speech-dispatcher configured to use espeak or espeak-ng which in some recent versions of speech-dispatcher give a way longer list than it should. Setting it up with espeak-ng here on arch and running spd-say -L to give the list of voices on the command line takes a couple of seconds and gives a list of 13363 different voices... (because it's including all locales and some mbrola variants, etc.)

Unfortunately there's not really a gui to configure speech-dispatcher yet. Users that hit this can edit their configuration files in ~/.config/speech-dispatcher/speechd.conf to disable espeak and other problematic synthesizers that have this issue. Or alternatively run spd-conf and choose a default synthesizer such as flite or festival or pico that each only have a few voices.

Alternatively I'll take a look and see if we can avoid that call in okular until the user asks for the Accessibility page maybe, though that would slow down switching to that page from other pages.
Comment 4 András Manţia 2024-03-06 11:39:15 UTC
Same for me in other apps too, i don't have Screen reader enabled and don't have  ~/.config/speech-dispatcher/speechd.conf at all.