[Bug 705238] New: It takes 10 minutes to launch xterm over ssh
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c0 Summary: It takes 10 minutes to launch xterm over ssh Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: x86-64 OS/Version: openSUSE 11.4 Status: NEW Severity: Normal Priority: P5 - None Component: X11 Applications AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: giecrilj@stegny.2a.pl QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 xterm preloads font resources at startup as specified in <URL: file:///usr/share/X11/app-defaults/XTerm >. There are 12 loads to load and each one is encoded as iso10646-1, which means their metric information is huge. When you stop and backtrace xterm in gdb, it shows it is waiting for a reply to _XQueryFont. Reproducible: Always Steps to Reproduce: 1. { ssh -X remote-machine; } 2. { xdg-su -c yast2; } 3. Wait until the xterm window appears Actual Results: 3. The xterm window appears after 10 minutes of waiting. Expected Results: 3. The xterm window should appear within a minute. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c zj jia <zjjia@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zjjia@novell.com AssignedTo|bnc-team-screening@forge.pr |meissner@novell.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c1 Marcus Meissner <meissner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dickey@his.com --- Comment #1 from Marcus Meissner <meissner@novell.com> 2011-07-14 12:04:28 UTC --- Wonder why it loads them as iso10646-1. I see 4MB transfered per start of xterm when running "ssh -v". -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c2 --- Comment #2 from Christopher Yeleighton <giecrilj@stegny.2a.pl> 2011-07-14 17:03:28 UTC --- xterm preloads font resources at startup as specified in <URL: file:///usr/share/X11/app-defaults/XTerm >. There are 12 fonts to load and each one is encoded as iso10646-1, which means their metric information is huge. So there is no need to wonder. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c3 --- Comment #3 from Christopher Yeleighton <giecrilj@stegny.2a.pl> 2011-07-14 17:05:18 UTC --- Note that replacing those entries with something else does not help; the only difference is that xterm loads "Misc-Fixed" instead of "misc-fixed". -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c4 --- Comment #4 from Christopher Yeleighton <giecrilj@stegny.2a.pl> 2011-07-14 17:06:42 UTC --- Note that removing those declarations does not help; the only difference is that xterm loads "Misc-Fixed" instead of "misc-fixed". (Please ignore the previous comment.) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c5 --- Comment #5 from Thomas Dickey <dickey@his.com> 2011-07-15 11:06:54 UTC --- xterm preloads fonts when it's necessary to compute the order for shifted keypad plus/minus. But at start-up - I don't recall that there's a path where it would do that. A quick check with xterm's trace for example shows only "fixed" being loaded - once. The replacement of the ISO-8859-1 "fixed" font with ISO-10646-1 is certainly a factor (no valid justification was given for that, of course). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c6 --- Comment #6 from Christopher Yeleighton <giecrilj@stegny.2a.pl> 2011-07-15 11:35:35 UTC --- (gdb) info break Num Type Disp Enb Address What 1 breakpoint keep y 0x00007ffff6c406a0 in _XQueryFont at Font.c:184 breakpoint already hit 11 times -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c7 --- Comment #7 from Christopher Yeleighton <giecrilj@stegny.2a.pl> 2011-07-15 11:48:24 UTC --- Note that we can go with ISO-10646-1 fonts when we assume that the font is monospaced; that should save us from having to perform a full query. The network bandwidth can be reduced by using client-side font subsets instead (via libXft). Our incarnation of xterm supports libXft (requires using *facetName instead of *font). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c8 --- Comment #8 from Christopher Yeleighton <giecrilj@stegny.2a.pl> 2011-07-15 11:49:24 UTC --- Correction: Our incarnation of xterm supports libXft (requires using *faceName instead of *font). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c9 --- Comment #9 from Thomas Dickey <dickey@his.com> 2011-07-15 23:19:25 UTC --- hmm - taking more time to look. It's the encoding that is the issue. I'm used to considering "uxterm" to be the normal way that utf-8 encoding is used. Using ltrace, I see that if xterm uses utf-8 encoding, it makes 10 calls to XQueryLoadFont. ltrace shows enough context to see which fonts are being loaded, e.g., 1) nil2 (which "should" be a small font), 2) fixed 3) a request for a bold version of "fixed", which is 8859-1 4) double-width medium 10646 5) double-width bold 10646 6) the "font" value from UXTerm app-defaults, which is 10646-1 7) a 10646 version of #3 8) same as #4 9) same as #5 10) unknown (context doesn't show a string) The basic reason why it's preloading those is so that it can refer to GC's for each. I can probably improve on the caching, e.g., so that 3-5 and 7-9 weren't accessed immediately (the caching work that I did a couple of years ago simply didn't go far enough). Still, that's only a factor of 2-3 over where it is now - so you'd be downloading a megabyte. Using Xft doesn't affect that much, unless xterm is unable to find the bitmap fonts - in that case it relies only on "fixed". Thinking about _that_, I've already modified it to work with just Xft. Another configuration tweak would allow it to ignore bitmap fonts. Then you'd only have Xft to be concerned with. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c10 --- Comment #10 from Christopher Yeleighton <giecrilj@stegny.2a.pl> 2011-07-16 08:57:24 UTC --- (In reply to comment #9)
Still, that's only a factor of 2-3 over where it is now - so you'd be downloading a megabyte.
Uploading, which is much worse than downloading because workstation up-links are asymmetric (for a good reason).
Using Xft doesn't affect that much, unless xterm is unable to find the bitmap fonts - in that case it relies only on "fixed".
or unless xterm ceases requesting them in the first place.
Thinking about _that_, I've already modified it to work with just Xft. Another configuration tweak would allow it to ignore bitmap fonts. Then you'd only have Xft to be concerned with.
I wish you every success in this undertaking :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c11 --- Comment #11 from Thomas Dickey <dickey@his.com> 2011-07-16 11:28:32 UTC --- I did add the last item to my to-do list (to add a resource setting to help in this area). So it might appear in #272. Addressing the middle part (reducing the fonts needed by xterm for UTF-8 mode) is stickier since there are probably places where xterm loads a font to check on its size. Some of that can be deferred - needs some investigation. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705238 https://bugzilla.novell.com/show_bug.cgi?id=705238#c12 --- Comment #12 from Christopher Yeleighton <giecrilj@stegny.2a.pl> 2011-08-01 16:43:08 UTC --- (In reply to comment #11)
Addressing the middle part (reducing the fonts needed by xterm for UTF-8 mode) is stickier since there are probably places where xterm loads a font to check on its size. Some of that can be deferred - needs some investigation.
I found this: If the CHARSET_ENCODING contains a "[" (LEFT SQUARE BRACKET), the "[" and the characters after it up to a "]" (RIGHT SQUARE BRACKET) are a subsetting hint telling the font source that the client is interested only in a subset of the characters of the font. The font source can, optionally, return a font that contains only those characters or any superset of those characters. The client can expect to obtain valid glyphs and metrics only for those characters, and not for any other characters in the font. The font properties may optionally be calculated by considering only the characters in the subset. <URL: file:///usr/share/doc/xorg-docs/specs/XLFD/xlfd.html#fontname_field_definitions
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com