[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xtoolwait - significantly speedup your .xsession



Amos Shapira writes:
 > I wrote:
 > |clients up and running within about 1-2 seconds (will try to
 > |remember to time this next time I login).
 > 
 > OK, it takes a little longer than 2 seconds to finish my .xsession (3
 > secs, excluding Netscape), but the main issue which came up from
 > timing each run of xtoolwait was that xtoolwait exited after about 360
 > milliseconds on some applications (xterm, ssh-add), around 700 ms for
 > xdaliclock and 1.3s for emacs.  I don't see any benefit in replacing
 > this with "(sleep 1; xterm) &" sort of lines.

Well, obviously your not going to do better than xtoolwait with a
bunch of sleeps!  Of *course* xtoolwait is probably getting close to
optimal speed by waiting for each window to appear before going to the
next client.  Sleeping for arbitrary amounts of time will *not*
achieve this, especially with 1 second resolutions, and especially
given that the amount of time one should sleep can vary - starting X
after a fresh reboot will be much slower than exiting and restarting,
since clients will have been cached in the second case, so one
shouldn't sleep as long.

And, of course, you have to tune the sleeps for optimal speed.  5
seconds was just to indicate the idea.  And I *did* say it's the low
tech version, not the low tech equivalent.

I was just explaining that for those who don't want to bother
installing a new package, they can roughly approximate it (which is to
say they can derive some total speedup, not that they'll necessarily
approach the speed of xtoolwait) by sleeping for the appropriate
amount of time between starting clients...  The easiest effect to
achieve (with the sleeps) is to get the server, the window manager,
and the 1st client to quickly come up, which is probably most of what
you need anyway to avoid having to wait around.

Harvey



References: