Slow starting and quitting (1.70.2 and above)

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

ijustdiscoveredthiswonder

Slow starting and quitting (1.70.2 and above)

Post by ijustdiscoveredthiswonder »

i noticed that xnview 1.70.2 was slow at startup and quitting, 1.70.3 is much faster but still too slow compared with similar applications.

just to be a bit more clear 1.70.2 took 2 or 3 seconds to startup and 1 or 2 to quit on a athlon xp 2.6 GHz, 1.70.3 takes 2 seconds to startup and 1 second to quit those are aprroximative timings but are slower than acdsee 6 power pack for instance, so i think there is a lot of room to improve performances.

it is not a serious problem, but i wanted you to know, so it can be improved.

thanks! :)
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Slow starting and quitting (1.70.2 and above)

Post by helmut »

ijustdiscoveredthiswonder wrote:...
it is not a serious problem, but i wanted you to know, so it can be improved.
...
One of XnView's main strength is fast starting and fast viewing. So a slow start is a serious problem.

A possible reason for a very slow XnView could be an active virus scanner:
On my laptop with Win 2000 and McAfee VirusScan when double-clicking on an image active it takes up to 10 seconds to start XnView and open the image. When deactivating VirusScan, the image opened in less than a
second.

Perhaps you can deactivate the virus scanner (just for testing) and then see whether XnView starts quickly or not.

Are you sure this problem did not occur in previous versions (before 1.70.2), too?
ijustdiscoveredthiswonder

Post by ijustdiscoveredthiswonder »

thank you for replying and for the hint, i will try it in "safe conditions" however my antivirus is NOD32 2.0006...and it's possible it is the reason, but when exiting i see the right panel of the catalog that remains painted on the screen for a while, so i guessed it was something related to graphic card (i have an asus geforce 4 fx 5200 with latest nvidia dirvers), maybe the way xnview manage the "DeviceContext", because i experienced that 1.70.3 is pretty faster than 1.70.2 (but still slow), unfortunately i never tried previous versions (i'm new to xnview).

this problem occurs also starting xnview exe directly (eg without opening an image).

i tried also on a Dell notebook -> same behaviour.

may i ask you wich graphic framework does xnview use (wxWindowx, gtk+, mfc, native winapi, etc.)? maybe the issue resides in there
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

ijustdiscoveredthiswonder wrote:may i ask you wich graphic framework does xnview use (wxWindowx, gtk+, mfc, native winapi, etc.)? maybe the issue resides in there
Strange, XnView uses win32 api
Pierre.
ijustdiscoveredthiswonder

Post by ijustdiscoveredthiswonder »

i also tried on a pc without any antivirus...same!

i also tried deleting any non-critical file into the xnview directory, nothing changed.

also toggling almost all settings, nothing changed.

the winapi must be fast, so maybe another scan or check done at startup, may i ask what logically does xnview at startup? i see something related to Adobe into xnview settings, maybe installations of Adobe products interfere with xnview (Acrobat reader for example)?

latest note: i've never installed xnview, i used the zip package since it is the thing i always prefer, may be something the installer fixes and i am missing it?

very strange problem and i thank you for paying attention to it :)
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

ijustdiscoveredthiswonder wrote:i also tried on a pc without any antivirus...same!
i also tried deleting any non-critical file into the xnview directory, nothing changed.
also toggling almost all settings, nothing changed.
Do you have plugins folder? language folder?
Pierre.
ijustdiscoveredthiswonder

Post by ijustdiscoveredthiswonder »

dear Pierre, i'm happy to tell you i found out what was the reason and the solution:

reason: the ini file and its size (=> too much time for parsing)

solution: use the registry.

despite the fact that i would have much more preferred to still use the ini file, i can say that you can have more urgent things to point your attention to.

details:
at first start was quite fast and default ini is 7 KB size, but changing associations preferences and so on, the ini file easily grows to 10 KB and xnview becomes really, really slow. an overcome to still use the ini file is to delete unnecessary entries from the ini file with a text editor, save it and make it "read only" (it has also the benefit of fixing preferences once for all), it becomes fast enough but still "laggy", using the registry it's faster than a blink of an eye.

i guess you are using the windows api to query the ini values, but i also remember that xnview has releases also for posix OSes for which i guess you use text file to save preferences, maybe an idea could be to use that format also tìfor the windows version, but obviously you really knows such things.

now that i have a solution i'm really fully enjoing this wonderful application, thanks a lot for gaving us xnview! ;)
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

ijustdiscoveredthiswonder wrote:reason: the ini file and its size (=> too much time for parsing)
Ok
Pierre.
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

ijustdiscoveredthiswonder wrote:dear Pierre, i'm happy to tell you i found out what was the reason and the solution:

reason: the ini file and its size (=> too much time for parsing)

solution: use the registry.

...
Very good that you have found this!
I've just checked on my laptop with Windows 2000, where XnView was starting very slow (about 10 seconds), too. And saving the settings in the registry also helped. Excellent! :-) On my laptop, there is a Virus scanner running and disabling it made XnView also fast, but this was not really an option.

Now that we know the reason for the slow start, perhaps Pierre can tackle this problem so that we can both use the .ini file and have a lightning fast XnView.
Last edited by helmut on Fri Jul 09, 2004 7:09 pm, edited 1 time in total.
ijustdiscoveredthiswonder

Post by ijustdiscoveredthiswonder »

i have nod32 with all scanning options activated and it takes less than half a second to start xnview, maybe in your case the antivirus may take some time because of the plugins and language dlls.

so i think it is possible that you may find some tuned settings for your antivirus, but without lowering security...that is i think there is no general reason for xnview to interfere with antiviruses
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

ijustdiscoveredthiswonder wrote:i have nod32 with all scanning options activated and it takes less than half a second to start xnview, maybe in your case the antivirus may take some time because of the plugins and language dlls.

so i think it is possible that you may find some tuned settings for your antivirus, but without lowering security...that is i think there is no general reason for xnview to interfere with antiviruses
Thanks for your hint. I had the same idea and have excluded the program directory of XnView and all it's subdirectories, already, but this did not help. Think the SystemScan of VirusScan scans whenever a file is read or written. The exlusion of folders seems not to apply for the SystemScan. BTW: I'm using Mac Afee VirusScan 4.5 on a Windows 2000 system, which is a pretty old version.

- Here's some numbers with setting 'Use Registry to save options' off:
XnView Startup time: 10s (!)
XnView Exit time*: 35s (!)
Files scanned when starting XnView: ~30
Files scanned when exiting XnView: 830 (!)

- Here's the numbers with setting 'Use Registry to save options' on:
XnView Startup time: <=1s
XnView Exit time*: <=1s
Files scanned when starting XnView: ~30
Files scanned when exiting XnView: 0

*Exit time = XnView process disappears in Windows task manager.

Summary:
On some systems reading and writing the .ini file can be very slow and result in very slow startup and exiting. Exiting does not look that slow, since the XnView window is closed immediately, but the process still persists for a while.
For all I can see this problem is also the reason for Multiple XnView instances (Windows XP).
Activating the option 'Use registry to save options' speeds up startup time significantly on those systems which have the 'slow startup problem'.

It's not clear how many systems and which systems are affected, but I hope that Pierre can do something about this.
ckit
XnThusiast
Posts: 2583
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia
Contact:

Post by ckit »

Wow, you're right using the registry is way faster and I'm a speed freak :)
ijustdiscoveredthiswonder

Post by ijustdiscoveredthiswonder »

helmut, your antivirus seems to behave oddly it should not interfere if you disable the xnview executables from scanning.

fortunately, the trick works for you too! ;)
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

helmut wrote:- Here's some numbers with setting 'Use Registry to save options' off:
XnView Startup time: 10s (!)
XnView Exit time*: 35s (!)
Files scanned when starting XnView: ~30
Files scanned when exiting XnView: 830 (!)
Very strange, it's crazy.... On my 2000 with ini file, xnview start and exit without delay :-(
How many bytes is your xnview.ini?
Pierre.
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

Just stumbled over this problem again, and want to bring it back on the table:

I've put XnView on a USB memory stick and started it directly from the USB stick. Starting XnView takes some seconds which is o.k., but when exiting XnView takes about 2.5 minutes (!). In the Windows task manager the process XnView can be seen and the LED of the USB stick keeps blinking during the whole time, it's XnView saving the .ini file that causes this.

Then I've checked the setting "Use regisry to save options" in Options > Install, then the problem dissappeared, XnView exited immediately.

Please note that the memory stick is used at an USB version 1.0 port, which is slow when writing single files. Also, McAfee VirusScan 7.0 is active.

Even if it's a problem of Windows or the antivirus program, I think something should be done about this. As a quick solution, settings could be saved in Windows registry rather than the .ini file.

System:
Laptop Intel 2.4 GHz, Windows XP SP2, XnView 1.74, McAfee VirusScan Enterprise 7.0, USB 1.0 (slow) connection
Post Reply