bugXBoard - Bugs: bug #34202, xboard has a 20-second startup...

 
 

bug #34202: xboard has a 20-second startup delay running with Ubuntu 11.04

Submitter:  Richard Kircher <rkircher>
Submitted:  Sun 04 Sep 2011 03:21:11 AM UTC
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Assigned to:  None Open/Closed:  Closed
Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

( Jump to the original submission )

Sat 29 Sep 2012 07:46:57 PM UTC, comment #9: 

seems like this problem was fixed and no more comments from bug reporter-> closed

Arun Persaud <apersaud>
Project Administrator
Sun 22 Jan 2012 01:32:09 AM UTC, comment #8: 

Just checking in if I can close this bug... IIRC the problem was solved?

Arun Persaud <apersaud>
Project Administrator
Fri 23 Dec 2011 11:21:45 PM UTC, comment #7: 

The command line option "-useBoardTexture true" worked fine but I think I created myself another related problem by copying the compiled executable file (xboard) over the top of the 4.5.3a xboard executable.  Ubuntu installs xboard in /usr/games/.  I think I ran "make install" or install-sh with 4.5.3a because xboard ended up in the directory /usr/local/bin/. 

I thought the man pages et. al. would be ok by copying.  Since xboard-4.6.0xxx.. is not an official release version, is it still ok to install with the provisions in the tar.gz file?   What is the version status of the man pages?

Richard Kircher <rkircher>
Fri 23 Dec 2011 08:17:07 PM UTC, comment #6: 

The command line option is "-useBoardTexture true".
You can use it on the command line or put it into your .xboardrc file, either manually or by saving all selected options in the Options menu.

Byrial Jensen <bjensen>
Project Member
Fri 23 Dec 2011 06:32:20 PM UTC, comment #5: 

Regarding board textures, I searched the man pages for xboard-4.5.3a and could not find the command-line option to set the board textures.  The textures are there by default in version 4.5.3a, but not there in the latest commit (ftp://alpha.gnu.org/gnu/xboard/xboard-4.6.0.20111203.tar.gz) that I compiled with NLS disabled.

I am aware of the new menu option:
View > Board... > Use Board Textures,

BUT don't want to set it manually each time I start xboard.
--Dick

Richard Kircher <rkircher>
Fri 23 Dec 2011 09:33:03 AM UTC, comment #4: 

Glad to hear about the reduced start up time.

For the textures try the new menu option:

  View > Board... > Use Board Textures

Byrial Jensen <bjensen>
Project Member
Fri 23 Dec 2011 04:33:54 AM UTC, comment #3: 

Thank-you.  Following your advice (your last paragraph), I now have the least startup delay ever achieved from other changes suggested by h.g. muller, and Arun Persaud.  With NLS disabled, I now get a 1.8-second delay with the medium xboard size, 16-bit color depth, Ubuntu 11.04, and both Thunderbird and Firefox running in separate virtual desktops.  The delay is 1.0-seconds without Thunderbird and Firefox running in the background to add loading to the xorg graphics system.

As you may know, color depth is the largest factor effecting the startup delay caused by xorg.  The attached data (RTF) files shows the effects of color depth and various board sizes.  You will notice that for xboard-4.4.4, the best result is 4-seconds with the smallest board size (Medium) and 16-bit color depth that I am practically able to tolerate.  The 2 + 2 = 4 represents the first and second delays (render the chessboard graphic + complete text in the xboard window and be ready to run).

After the attached data was measured, an improved total delay of 2.7-seconds was achieved using xboard-4.5.3a with a patch to xboard.c as suggested by h.g. muller:
if(gameInfo.variant != VariantNormal) gameInfo.boardWidth = 0;
(replaces code "gameInfo.boardWidth = 0;"  line 2628 in xboard.c for 4.5.3a)

Although the latest/newest version suggested (ftp://alpha.gnu.org/gnu/xboard/xboard-4.6.0.20111203.tar.gz) with the "./configure --disable-nls" change applied does produce the least delay (1.8/1.0) on my computer, I found that the pleasing woodgrain texture of the 4.5.3a version chessboard is lost with the 4.6.0.20111203 version that has plain green/yellow colors for the chessboard.  I therefore tried the disable-nls configure change on version 4.5.3a and then added the "if(gameInfo.variant != VariantNormal) gameInfo.boardWidth = 0;" patch to xboard.c.  To my surprise, it has the same 1.8/1.0-second delay and just looks better, so that's what I'm using now.  Any explanation of what I might be doing wrong to lose the woodgrain chessboard in the latest 4.6 version would be appreciated since I do like the idea of keeping up with the latest version.

Again, thanks from a happy camper with the 1.0 to 1.8-sec delay that is much improved over the original 40-second delay with only a slight reduction in graphic quality and board size.  I'm going back to mostly playing chess, but would be happy to test any future improvements in xboard since I have a system that is sensitive to xboard start-up start-up delays that I know does not effect all other computers for some reason.

PS- will also try to post this message to: <http://savannah.gnu.org/bugs/?34202>

--Dick

(file #24654)

Richard Kircher <rkircher>
Wed 21 Dec 2011 11:12:43 AM UTC, comment #2: 

Hi,

I did some test of the start up times in different versions to find what have caused this regression.

I replaced the main loop (XtAppMainLoop) with a dummy function that returns immediately using LD_PRELOAD, and timed the real time used by xboard from start to exit. It was real time because presumably most of the time is spent by the X server.

All times was about 3.2 seconds until this patch:

commit 30583dd0f88cef9b1281f2ce5fa06651bf6d4bb6
Author: Tim Mann <tim@tim-mann.org>
Date:   Mon May 30 13:21:06 2011 -0700

    Add a final wildcard default for fonts.  This gives XCreateFontSet
    more freedom and lets it find fonts for some obscure charsets where
    fixed-bold or fixed-medium etc. may not have one.

That increased the time to 3.8 seconds if configured with NLS enabled. It may possibly cause a much worse increase in start up time if you are short on RAM and the computer have to use swap memory.

The time stayed at 3.8 s until this patch:

commit 2bc700b32c6058a3e8f9c3a70d842c525cf0a6e3
Author: H.G. Muller <h.g.muller@hccnet.nl>
Date:   Mon Nov 28 11:56:18 2011 +0100

    Refrain from making unnecessary resize X request

   

    The window resizing code in InitDrawingSizes is suppressed when no
    change is needed. Similarly, changing piece bitmaps is suppressed when
    we stay in the same variant (and InitDrawingSizes is called e.g. because
    of chaging lineGap through the Board dialog).

It reduced the start up time to 2.3 seconds with NLS enabled and and 1.7 s without NLS.

So my advice at the moment is:
Try the newest version from git or the latest test tar ball (ftp://alpha.gnu.org/gnu/xboard/xboard-4.6.0.20111203.tar.gz), configure it without NLS (the command is "./configure --disable-nls") and see if this solves the problem.

Byrial Jensen <bjensen>
Project Member
Mon 05 Sep 2011 03:19:32 PM UTC, comment #1: 

Hello Richard

is it possible for you to compile versions from git? If so, we probably can narrow things down to see where the problem was introduced and to see if we can fix it in xboard or if it is due to something else (which is an option, since this doesn't seem to happen on other distributions).

Arun

Arun Persaud <apersaud>
Project Administrator
Sun 04 Sep 2011 03:21:11 AM UTC, original submission:  

This is the same problem that has been reported on the web
many times with no solution posted.  For example, it is
described very well at:
http://old.nabble.com/Extremely-slow-startup-td29341827.html

My startup time is 40-seconds, and is even slower.  It takes 20-seconds for the xboard graphics to be shown and then
another 20-seconds for the menus to be added and become
functional. 

I think the problem is strongly related to Ubuntu 11.04 because
I have taken early versions (4.2.x) from an OpenSUSE 11.0
installation and used it to replace the xboard executable in
version 4.5.x in Ubuntu 11.04 and it changes from a startup
time of about 1/2-second in openSUSE 11.0 to 40-seconds running under Ubuntu 11.04.

The delay may be in the video because I can't run Unity in
Ubuntu 11.04 and use the older Gnome 2.0 with no special effects.  I think Unity sucks, but for this problem I loaded
Unity 2D and it had no effect on the xboard startup delay.

Otherwise the bug is the same as posted elsewhere on the web. 

Richard Kircher <rkircher>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #24654:  xboard-delay-vs-boardsize.rtf added by rkircher (8KiB - application/rtf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bjensen (Posted a comment)
  • -email is unavailable- added by apersaud (Posted a comment)
  • -email is unavailable- added by rkircher (Submitted the item)
  • -email is unavailable- added by rkircher (Any help or other things to try is appreciated.)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-09-29 apersaud StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2011-12-23 rkircher Attached File- Added xboard-delay-vs-boardsize.rtf, #24654
    2011-09-05 apersaud StatusNone Need Info
    2011-09-04 rkircher Carbon-Copy- Added -email is unavailable-

    Back to the top


    Powered by Savane 3.9