Wine startup time

Questions about Wine on Linux
Locked
jmstone
Newbie
Newbie
Posts: 1
Joined: Sat Aug 16, 2014 10:59 am

Wine startup time

Post by jmstone »

Hi everyone,

Can you let me know what you think the longest reasonable time for wine to startup after a reboot would be, and what the average time might be?

On my system it is 26 seconds first run, and 3.5 seconds second run. A developer I am speaking with seems to think that is abnormally slow. His program has to wait for wine to start before moving on to the next command (on his system this is a maximum of 3 seconds!).. I suggested he should have a timeout of at least 45 seconds to allow for variations in hardware.. or maybe there is something seriously wrong with my system :)

Would appreciate thoughts on this..
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: Wine startup time

Post by oiaohm »

jmstone wine is a nasty program for start-up times. Anything from a few sections of about 15-20 mins first run start up time is possible out of wine without anything exactly being broken.

https://bugs.winehq.org/show_bug.cgi?id=17548
Its bugs/issues like this bug that make a 15-20 min start-up time possible. Minutes of start-up time can be true on a system with a lot of fonts and printers installed. Add in a few background services that applications have added... add a few other things. It does not much to get to 15 mins start times.

It is not really possible for wine start up time to be predictable there are so many variables on stuff wine has to prep up.

45 second time out would be still in the camp of highly optimistic if you have done nothing to control the environment wine is operating in. Most likely better to display a splash screen explaining to the user what is going on.

Now I will take that you don't want to have to deal with this insanity of random startup times.

Issue 1: Too many fonts.
This font issue is a font list that Windows programs understand has to be produced. Windows slows down start-up time as you increase number of fonts as well(same issue) so this this is not a Wine unique problem so making is hard to fix.

The font issue can be sledge hammered by a custom fontconfig file on Linux and a lot of overrides.
http://www.freedesktop.org/software/fon ... -user.html
Yes 3 environment settings have to messed with FONTCONFIG_PATH, FONTCONFIG_PATH and XDG_CONFIG_HOME. The last one XDG_CONFIG_HOME in a major pain resulting in a faked up directory to prevent user modified font settings coming into play. Result number of fonts seen to the application be only the number it needs no more and of course run fc-cache to produce a font cache.

Issue 2: application background services.
Background services that applications have installed start before applications will be run. This is a very good reason to run a WINEPREFIX per application to avoid having to start other applications background services when running a different application.

Issue 3: Audio taking forever to connect up.
Audio sometimes can take ages to hook up to this can take into seconds. This is pulseaudio and other things it just can be slow. If application does not need audio this can be fixed by disabling audio in registry http://wiki.winehq.org/UsefulRegistryKeys

Issue 4: Wine version updates.
Wine can take a random amount of time when wine version updates for wine to start. Solution use a application shipped version of wine that you control when it updates or smartly do a wine version check before running anything and hope it does not update in the middle to reduce the number of times this catches your end users. Different version of wine to last time. Also note wine version change the application program is attempting to use may no longer work either.

Issue 5: Huge number of printers.
You are in a network with a huge number of printers and wine is slow to start.
What is going on Wine is making a listing for every single one into the registry so windows programs can find printers. Build wine without printer support is a solution but the result is also no printing from the application. There is no switch or environmental var to disable this functionality.

jmstone this is like the top 5 of reasons why Wine will be slow to start. I decided to stop at the top 5 from what I know there are about another 40 more issues. Some could be improved by wine being modified to add a few more options. Some like printers is down right hard to fix.

From a point of view of pain a native Linux program doing the same thing is way simpler. Choose wine expect some start-up time issues. jmstone the developer you are dealing with is being insanely optimistic that wine will run something inside 3 seconds. Its only happening inside 3 seconds for that developer because his system is light on fonts and other things. Tell developer to add a huge stack of printers and a stack of fonts and watch what happens.

Wine is not a magic bullet using. Using wine has a price to pay. Part of that is informing users that items could be slow to start due to being run in wine.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Wine startup time

Post by dimesio »

You are in a network with a huge number of printers and wine is slow to start.
There's also a long-known bug of Wine being slow to start when a network printer is unreachable. https://bugs.winehq.org/show_bug.cgi?id=10358
Locked