[Linux] 0.90 takes much longer than usual to start

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
User avatar
pangwolin
Posts: 60
Joined: Sun Sep 25, 2016 7:53 pm

[Linux] 0.90 takes much longer than usual to start

Post by pangwolin »

Just upgraded from 0.88 to 0.90 and the startup time is much longer than it should be.

This happens with no .ini file at all (factory reset) with xnview.sh pointing to system libs: strace log attached (xnviewmp_20180403_1951_factory_start.strace)

Same result when starting again a second time: strace log attached (xnviewmp_20180403_1952_second_start.strace)

Same result with the default xnview.sh pointing to the bundled libs (which causes the usual font problem) : strace log attached (xnviewmp_20180403_2010_third_start.strace).

I don't understand why XnViewMP generates so many system calls on startup. Either way, it causes a much longer startup time, even when launching by opening a file directly.

Reminder: the font issue on Arch Linux requires to point to system libs instead of the bundled libs, otherwise, lots of errors occur (xnviewmp_20180403_2026_fourth_start.log).
That's why XnViewMP stats the entire /usr/lib/ directories. Still, I think it's not very well optimized and should only load the libs it needs (does it really need to stat the entire directory trees?).

Code: Select all

#!/bin/sh
dirname=`readlink -e "$0"`
dirname=`dirname "$dirname"`
export LD_LIBRARY_PATH="/usr/lib:$dirname/Plugins"
export QT_PLUGIN_PATH="/usr/lib:$dirname/lib:/usr/lib/qt/plugins"
export QT_QPA_PLATFORM_PLUGIN_PATH="$dirname/lib/platforms/"
QT_QPA_PLATFORMTHEME=qt5ct
exec "$dirname/XnView" "$@"
Attachments
xnview_080_pangwolin_strace_20180403.tar.gz
(1.1 MiB) Downloaded 56 times
Last edited by pangwolin on Wed Apr 04, 2018 3:38 pm, edited 1 time in total.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: [Linux] 0.80 takes much longer than usual to start

Post by xnview »

0.80?? not 0.90?
Pierre.
User avatar
pangwolin
Posts: 60
Joined: Sun Sep 25, 2016 7:53 pm

Re: [Linux] 0.90 takes much longer than usual to start

Post by pangwolin »

Oops sorry, I meant 0.90.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: [Linux] 0.90 takes much longer than usual to start

Post by xnview »

it is installed in /opt/xnviewmp? Less system calls with 0.88? do you use the default skin?
Pierre.
User avatar
pangwolin
Posts: 60
Joined: Sun Sep 25, 2016 7:53 pm

Re: [Linux] 0.90 takes much longer than usual to start

Post by pangwolin »

My bad, after further testing, I realized I had some past workarounds for libfontconfig laying around in my /opt/ directory (some outdated versions where still symlinked).

Reinstalling from scratch fixes the issue!

Sorry for the noise, thanks!
Post Reply