public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
       [not found] <b2c39fcb1003290333r688e2f9dm2370567a67986092@mail.gmail.com>
@ 2010-03-29 16:15 ` Jon TURNEY
  2010-03-30  1:53   ` Dan Tsafrir
  0 siblings, 1 reply; 20+ messages in thread
From: Jon TURNEY @ 2010-03-29 16:15 UTC (permalink / raw)
  To: cygwin, cygwin-xfree; +Cc: dants

On 29/03/2010 11:33, Dan Tsafrir wrote:
> After I've upgraded to cygwin-1.7 my emacs takes 30-40 seconds to
> open. Following
> http://x.cygwin.com/docs/faq/cygwin-x-faq.html#poor-performance,
> disabling my antivirus has no affect on emacs's opening time. As far
> as I can tell other X programs behave similarly to the way they did
> before the upgrade. Any help would be appreciated. The output of
> 'cygcheck -s -v -r' is attached.

LANG = 'C.UTF-8'

You are probably being bitten by [1]

As far as I can tell, this is a general problem with X, but cygwin 
unfortunately encounters it in a default install because (a) the default 
locale is a UTF-8 locale, and (b) we don't install the CJK fonts by default.

Workarounds you might try are (a) install the font packages font-isas-misc, 
font-jis-misc and font-daewoo-misc (and restart your server), or (b) set your 
locale to a non-UTF-8 one.

We need to do something about this, but as the discussion in the bug should 
make clear, we're not sure what :-)

[1] http://sourceware.org/bugzilla/show_bug.cgi?id=10948

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-03-29 16:15 ` emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7 Jon TURNEY
@ 2010-03-30  1:53   ` Dan Tsafrir
  2010-04-05 21:39     ` Jon TURNEY
  0 siblings, 1 reply; 20+ messages in thread
From: Dan Tsafrir @ 2010-03-30  1:53 UTC (permalink / raw)
  To: cygwin-xfree

On Mon, Mar 29, 2010 at 19:14, Jon TURNEY <jon.turney@dronecode.org.uk> wrote:
> On 29/03/2010 11:33, Dan Tsafrir wrote:
>>
>> After I've upgraded to cygwin-1.7 my emacs takes 30-40 seconds to
>> open. Following
>> http://x.cygwin.com/docs/faq/cygwin-x-faq.html#poor-performance,
>> disabling my antivirus has no affect on emacs's opening time. As far
>> as I can tell other X programs behave similarly to the way they did
>> before the upgrade. Any help would be appreciated. The output of
>> 'cygcheck -s -v -r' is attached.
>
> LANG = 'C.UTF-8'
>
> You are probably being bitten by [1]
>
> [1] http://sourceware.org/bugzilla/show_bug.cgi?id=10948

I confirm the symptom described in [1] happening when I invoke
emacs-x11; namely, emacs-x11 indeed consumes a lot of CPU upon
startup. But, alas, the workarounds you suggest don't solve the
problem. Specifically:

> As far as I can tell, this is a general problem with X, but cygwin
> unfortunately encounters it in a default install because (a) the default
> locale is a UTF-8 locale, and (b) we don't install the CJK fonts by default.
>
> Workarounds you might try are (a) install the font packages font-isas-misc,
> font-jis-misc and font-daewoo-misc (and restart your server),

As can be seen in the cygcheck.out I've attached to my initial email,
these fonts were/are already installed in my system:

  font-isas-misc                  1.0.1-1
  font-jis-misc                   1.0.1-1
  font-daewoo-misc                1.0.1-1

(In fact, I've installed all the available fonts in cygwin setup.)

> or (b) set your locale to a non-UTF-8 one.

I've conducted a few repeated measurements and it looks as though
setting LANG to be en_US somewhat reduces the start time of emacs-x11:
instead of ~30 seconds with LANG=C.UTF-8, it take ~27 seconds
LANG=en_US. While this is ~10% less, waiting 27 seconds for emacs to
open still seems unreasonable.

Any other ideas?

Thanks,
--Dan

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-03-30  1:53   ` Dan Tsafrir
@ 2010-04-05 21:39     ` Jon TURNEY
  2010-04-13  6:46       ` Dan Tsafrir
  0 siblings, 1 reply; 20+ messages in thread
From: Jon TURNEY @ 2010-04-05 21:39 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: dants

On 29/03/2010 23:41, Dan Tsafrir wrote:
> On Mon, Mar 29, 2010 at 19:14, Jon TURNEY wrote:
>> On 29/03/2010 11:33, Dan Tsafrir wrote:
>>>
>>> After I've upgraded to cygwin-1.7 my emacs takes 30-40 seconds to
>>> open.

Sorry, I hadn't noticed what you'd written about xterm starting up normally, I 
guess that tends to suggest this is an emacs-specific problem in some way 
rather than the general X fontset problem I assumed it was...

> I've conducted a few repeated measurements and it looks as though
> setting LANG to be en_US somewhat reduces the start time of emacs-x11:
> instead of ~30 seconds with LANG=C.UTF-8, it take ~27 seconds
> LANG=en_US. While this is ~10% less, waiting 27 seconds for emacs to
> open still seems unreasonable.
>
> Any other ideas?

Hmm....

You don't have any emacs fonts being set via ~/.Xdefaults or ~/.Xresources?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-04-05 21:39     ` Jon TURNEY
@ 2010-04-13  6:46       ` Dan Tsafrir
  2010-04-13  9:42         ` Bengt-Arne Fjellner
                           ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Dan Tsafrir @ 2010-04-13  6:46 UTC (permalink / raw)
  To: Jon TURNEY, cygwin-xfree

On Tue, Apr 6, 2010 at 00:39, Jon TURNEY <jon.turney@dronecode.org.uk> wrote:
>
>> I've conducted a few repeated measurements and it looks as though
>> setting LANG to be en_US somewhat reduces the start time of emacs-x11:
>> instead of ~30 seconds with LANG=C.UTF-8, it take ~27 seconds
>> LANG=en_US. While this is ~10% less, waiting 27 seconds for emacs to
>> open still seems unreasonable.
>>
>> Any other ideas?
>
> Hmm....
>
> You don't have any emacs fonts being set via ~/.Xdefaults or ~/.Xresources?

Actually, I do. However, following the suggestion of Ken Brown

   http://www.mail-archive.com/cygwin@cygwin.com/msg107126.html

I've invoked emacs with -Q (and also, just to make sure, removed my
~/.Xdefaults). It did not change anything: emacs still takes ~30
seconds to open.

What else?
---Dan

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-04-13  6:46       ` Dan Tsafrir
@ 2010-04-13  9:42         ` Bengt-Arne Fjellner
  2010-04-13 11:16           ` Dan Tsafrir
  2010-04-13 13:54         ` Ken Brown
  2010-04-13 14:30         ` Jon TURNEY
  2 siblings, 1 reply; 20+ messages in thread
From: Bengt-Arne Fjellner @ 2010-04-13  9:42 UTC (permalink / raw)
  To: cygwin-xfree

On 2010-04-13 1:52 AM, Dan Tsafrir wrote:
> On Tue, Apr 6, 2010 at 00:39, Jon TURNEY<jon.turney@dronecode.org.uk>  wrote:
>    
>>      
>>> I've conducted a few repeated measurements and it looks as though
>>> setting LANG to be en_US somewhat reduces the start time of emacs-x11:
>>> instead of ~30 seconds with LANG=C.UTF-8, it take ~27 seconds
>>> LANG=en_US. While this is ~10% less, waiting 27 seconds for emacs to
>>> open still seems unreasonable.
>>>
>>> Any other ideas?
>>>        
>> Hmm....
>>
>> You don't have any emacs fonts being set via ~/.Xdefaults or ~/.Xresources?
>>      
> Actually, I do. However, following the suggestion of Ken Brown
>
>     http://www.mail-archive.com/cygwin@cygwin.com/msg107126.html
>
> I've invoked emacs with -Q (and also, just to make sure, removed my
> ~/.Xdefaults). It did not change anything: emacs still takes ~30
> seconds to open.
>
> What else?
> ---Dan
>
>    
A shot (well two) in the dark.

I have seen delays of 30 seconds when the resolver has problems. Is your 
dns configuration correct?
Do you have valid entries for localhost and your real hostname in 
windows/system32/drivers/etc/hosts?


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-04-13  9:42         ` Bengt-Arne Fjellner
@ 2010-04-13 11:16           ` Dan Tsafrir
  0 siblings, 0 replies; 20+ messages in thread
From: Dan Tsafrir @ 2010-04-13 11:16 UTC (permalink / raw)
  To: cygwin-xfree

On Tue, Apr 13, 2010 at 09:46, Bengt-Arne Fjellner
<Bengt-Arne.Fjellner@ltu.se> wrote:
>
> On 2010-04-13 1:52 AM, Dan Tsafrir wrote:
>>
>> I've invoked emacs with -Q (and also, just to make sure, removed my
>> ~/.Xdefaults). It did not change anything: emacs still takes ~30
>> seconds to open.
>
>
> A shot (well two) in the dark.
>
> I have seen delays of 30 seconds when the resolver has problems. Is your dns
> configuration correct?
> Do you have valid entries for localhost and your real hostname in
> windows/system32/drivers/etc/hosts?

I'm not sure I know enough to answer these questions. If you could
please be more specific regarding what to check, I'll provide the
information. Assuming it's related, other then comment lines, my
cygwin /etc/hosts contains this single line only: "127.0.0.1
localhost". My DNS configuration appears to be working fine.

Note that the emacs / cygwin1.7 problem is reproducible in that it
reoccurs whenever I do a clean cygwin install (only installing the
default components plus emacs and its dependencies).

--Dan

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-04-13  6:46       ` Dan Tsafrir
  2010-04-13  9:42         ` Bengt-Arne Fjellner
@ 2010-04-13 13:54         ` Ken Brown
  2010-04-14  7:17           ` Dan Tsafrir
  2010-04-13 14:30         ` Jon TURNEY
  2 siblings, 1 reply; 20+ messages in thread
From: Ken Brown @ 2010-04-13 13:54 UTC (permalink / raw)
  To: cygwin-xfree

On 4/12/2010 7:52 PM, Dan Tsafrir wrote:
> On Tue, Apr 6, 2010 at 00:39, Jon TURNEY<jon.turney@dronecode.org.uk>  wrote:
>>
>>> I've conducted a few repeated measurements and it looks as though
>>> setting LANG to be en_US somewhat reduces the start time of emacs-x11:
>>> instead of ~30 seconds with LANG=C.UTF-8, it take ~27 seconds
>>> LANG=en_US. While this is ~10% less, waiting 27 seconds for emacs to
>>> open still seems unreasonable.
>>>
>>> Any other ideas?
>>
>> Hmm....
>>
>> You don't have any emacs fonts being set via ~/.Xdefaults or ~/.Xresources?
>
> Actually, I do. However, following the suggestion of Ken Brown
>
>     http://www.mail-archive.com/cygwin@cygwin.com/msg107126.html
>
> I've invoked emacs with -Q (and also, just to make sure, removed my
> ~/.Xdefaults). It did not change anything: emacs still takes ~30
> seconds to open.

It still might be font related.  You mentioned earlier in the thread 
that you installed all available font packages.  Do you have a very 
large ~/.fontconfig directory as a result?  Maybe emacs has to process 
this every time it starts up.  (I'm not sure.)

What if you delete this directory and do a minimal Cygwin install 
without so many fonts?  I think the first time you start emacs it may 
call fc-cache to populate ~/.fontconfig, but after that it might start 
faster.

Ken

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-04-13  6:46       ` Dan Tsafrir
  2010-04-13  9:42         ` Bengt-Arne Fjellner
  2010-04-13 13:54         ` Ken Brown
@ 2010-04-13 14:30         ` Jon TURNEY
  2010-04-13 19:57           ` Markus Hoenicka
  2010-04-14  8:20           ` Dan Tsafrir
  2 siblings, 2 replies; 20+ messages in thread
From: Jon TURNEY @ 2010-04-13 14:30 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: dants

On 13/04/2010 00:52, Dan Tsafrir wrote:
> On Tue, Apr 6, 2010 at 00:39, Jon TURNEY wrote:
>>> I've conducted a few repeated measurements and it looks as though
>>> setting LANG to be en_US somewhat reduces the start time of emacs-x11:
>>> instead of ~30 seconds with LANG=C.UTF-8, it take ~27 seconds
>>> LANG=en_US. While this is ~10% less, waiting 27 seconds for emacs to
>>> open still seems unreasonable.
>>>
>>> Any other ideas?
>>
>> Hmm....
>>
>> You don't have any emacs fonts being set via ~/.Xdefaults or ~/.Xresources?
>
> Actually, I do. However, following the suggestion of Ken Brown
>
>     http://www.mail-archive.com/cygwin@cygwin.com/msg107126.html
>
> I've invoked emacs with -Q (and also, just to make sure, removed my
> ~/.Xdefaults). It did not change anything: emacs still takes ~30
> seconds to open.

The mechanism that loads ~/.Xdefaults into the X server resource database is 
nicely obscure, so I'm not sure that -q actually avoids that.

The definitive way to check would be to move ~/.Xdefaults aside, restart the X 
server then start emacs (I'm not sure if your clean install test would have 
done this or not)

Another thing which might be worth trying is to see if the behaviour changes 
in a non-UTF-8 locale, e.g. export LANG=C and then run emacs.

So far it seems that (1) emacs takes a long time to start up (2) xterm starts 
up quickly.  Are there other X applications that you use and how do they behave?

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to  cygwin-1.7
  2010-04-13 14:30         ` Jon TURNEY
@ 2010-04-13 19:57           ` Markus Hoenicka
  2010-04-14  8:26             ` Dan Tsafrir
  2010-04-14  8:20           ` Dan Tsafrir
  1 sibling, 1 reply; 20+ messages in thread
From: Markus Hoenicka @ 2010-04-13 19:57 UTC (permalink / raw)
  To: cygwin-xfree

Jon TURNEY <jon.turney@dronecode.org.uk> was heard to say:

> So far it seems that (1) emacs takes a long time to start up (2)  
> xterm starts up quickly.  Are there other X applications that you  
> use and how do they behave?
>

I've followed this thread with interest, but so far I thought I'm not  
affected. I usually start emacs along with the xserver by typing  
"startxwin /usr/bin/emacs" in the MinTTY console. This works without  
problems. Also, starting Emacs from the right-click menu of the X  
server in the system tray works fine. However, I've never noticed that  
starting emacs from MinTTY into a running X session actually takes  
quite some time. That is, I can confirm this part of the OP's problem.

What I cannot confirm is that xterm works ok. xterm runs ok from the X  
server right-click menu. It shows the same start-up delay when started  
from MinTTY as emacs. Interesting, but not necessarily related to the  
problem is the fact that in both cases different bash startup files  
seem to be evaluated. When starting from MinTTY (and waiting...), I  
get my customized bash prompt, whereas I get a default "bash-3.2$"  
prompt when starting from the right-click menu.

BTW I don't have a ~/.fontconfig directory or an ~/Xdefaults file, so  
these are probably not related to the problem.

I used strace to see where xterm spends its start-up time, see the  
output below. I get several pages of the block of lines shown below.  
Each block takes a couple of seconds to finish, so this is where most  
of the time is wasted. Does this help to find out what's happening?

regards,
Markus


    51 65525456 [main] xterm 3332 fhandler_base::open_fs: 1 =  
fhandler_disk_file::open (\??\C:\Programme\cygwin-1.7\var\run\utmp,  
0x10002)
    58 65525514 [main] xterm 3332 open: 4 = open (/var/run/utmp, 0x10002)

<start block>
    58 65525572 [main] xterm 3332 readv: readv (4, 0x22BCF4, 1)  
blocking, sigcatchers 0
  1137 65526709 [main] xterm 3332 readv: no need to call ready_for_read
    74 65526783 [main] xterm 3332 fhandler_base::read: returning 308,  
binary mode
    35 65526818 [main] xterm 3332 readv: 308 = readv (4, 0x22BCF4, 1), errno 0
</end block>

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-04-13 13:54         ` Ken Brown
@ 2010-04-14  7:17           ` Dan Tsafrir
  0 siblings, 0 replies; 20+ messages in thread
From: Dan Tsafrir @ 2010-04-14  7:17 UTC (permalink / raw)
  To: cygwin-xfree

[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]

On Tue, Apr 13, 2010 at 14:16, Ken Brown <kbrown@cornell.edu> wrote:
> On 4/12/2010 7:52 PM, Dan Tsafrir wrote:
>>
>> On Tue, Apr 6, 2010 at 00:39, Jon TURNEY<jon.turney@dronecode.org.uk>
>>  wrote:
>>>
>>>> I've conducted a few repeated measurements and it looks as though
>>>> setting LANG to be en_US somewhat reduces the start time of emacs-x11:
>>>> instead of ~30 seconds with LANG=C.UTF-8, it take ~27 seconds
>>>> LANG=en_US. While this is ~10% less, waiting 27 seconds for emacs to
>>>> open still seems unreasonable.
>>>>
>>>> Any other ideas?
>>>
>>> Hmm....
>>>
>>> You don't have any emacs fonts being set via ~/.Xdefaults or
>>> ~/.Xresources?
>>
>> Actually, I do. However, following the suggestion of Ken Brown
>>
>>    http://www.mail-archive.com/cygwin@cygwin.com/msg107126.html
>>
>> I've invoked emacs with -Q (and also, just to make sure, removed my
>> ~/.Xdefaults). It did not change anything: emacs still takes ~30
>> seconds to open.
>
> It still might be font related.  You mentioned earlier in the thread that
> you installed all available font packages.  Do you have a very large
> ~/.fontconfig directory as a result?  Maybe emacs has to process this every
> time it starts up.  (I'm not sure.)
>
> What if you delete this directory and do a minimal Cygwin install without so
> many fonts?  I think the first time you start emacs it may call fc-cache to
> populate ~/.fontconfig, but after that it might start faster.

Hm, it seems I don't have a ~/.fontconfig. The output of

    find / -name '*fontconfig*' -print

in my system is given in the attached file (I've checked
/var/cache/fontconfig which turned out to be empty). I hope that's
normal.

--Dan

[-- Attachment #2: find-fontconfig --]
[-- Type: application/octet-stream, Size: 1852 bytes --]

/var/cache/fontconfig
/etc/setup/fontconfig.lst.gz
/etc/setup/libfontconfig1.lst.gz
/etc/postinstall/fontconfig.sh.done
/etc/preremove/fontconfig.sh
/bin/cygfontconfig-1.dll
/usr/share/doc/Cygwin/fontconfig.README
/usr/share/doc/fontconfig
/usr/share/doc/fontconfig/fontconfig-user.html
/usr/share/doc/fontconfig/fontconfig-user.pdf
/usr/share/doc/fontconfig/fontconfig-user.txt
/usr/bin/cygfontconfig-1.dll
/cygdrive/c/Documents and Settings/Dan Tsafrir/My Documents/Downloads/cygwin-setup/http%3a%2f%2fwww.gtlib.gatech.edu%2fpub%2fcygwin%2f/release/X11/fontconfig
/cygdrive/c/Documents and Settings/Dan Tsafrir/My Documents/Downloads/cygwin-setup/http%3a%2f%2fwww.gtlib.gatech.edu%2fpub%2fcygwin%2f/release/X11/fontconfig/fontconfig-2.8.0-1.tar.bz2
/cygdrive/c/Documents and Settings/Dan Tsafrir/My Documents/Downloads/cygwin-setup/http%3a%2f%2fwww.gtlib.gatech.edu%2fpub%2fcygwin%2f/release/X11/fontconfig/libfontconfig1
/cygdrive/c/Documents and Settings/Dan Tsafrir/My Documents/Downloads/cygwin-setup/http%3a%2f%2fwww.gtlib.gatech.edu%2fpub%2fcygwin%2f/release/X11/fontconfig/libfontconfig1/libfontconfig1-2.8.0-1.tar.bz2
/cygdrive/c/Program Files/Common Files/GTK/2.0/bin/libfontconfig-1.dll
/cygdrive/c/cygwin-before1.7-27Mar10/etc/setup/fontconfig.lst.gz
/cygdrive/c/cygwin-before1.7-27Mar10/etc/setup/libfontconfig1.lst.gz
/cygdrive/c/cygwin-before1.7-27Mar10/etc/postinstall/fontconfig.sh.done
/cygdrive/c/cygwin-before1.7-27Mar10/bin/cygfontconfig-1.dll
/cygdrive/c/cygwin-before1.7-27Mar10/usr/share/doc/Cygwin/fontconfig-2.6.0.README
/cygdrive/c/cygwin-before1.7-27Mar10/usr/share/doc/fontconfig-2.6.0
/cygdrive/c/cygwin-before1.7-27Mar10/usr/share/doc/fontconfig-2.6.0/fontconfig-devel.txt
/cygdrive/c/cygwin-before1.7-27Mar10/usr/share/doc/fontconfig-2.6.0/fontconfig-user.txt
/cygdrive/c/cygwin-before1.7-27Mar10/var/cache/fontconfig


[-- Attachment #3: Type: text/plain, Size: 223 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-04-13 14:30         ` Jon TURNEY
  2010-04-13 19:57           ` Markus Hoenicka
@ 2010-04-14  8:20           ` Dan Tsafrir
  2010-04-14  9:25             ` Dan Tsafrir
  1 sibling, 1 reply; 20+ messages in thread
From: Dan Tsafrir @ 2010-04-14  8:20 UTC (permalink / raw)
  To: cygwin-xfree

On Tue, Apr 13, 2010 at 17:22, Jon TURNEY <jon.turney@dronecode.org.uk> wrote:
>
> The mechanism that loads ~/.Xdefaults into the X server resource database is
> nicely obscure, so I'm not sure that -q actually avoids that.
>
> The definitive way to check would be to move ~/.Xdefaults aside, restart the
> X server then start emacs (I'm not sure if your clean install test would
> have done this or not)

Yes, this is what I've done after the -Q didn't work. I'm currently
running without any customized ~/.Xdefaults, ~/.emacs, ~/.bashrc, etc.
It didn't make the problem go away. Emacs still takes ~30 sec to open.

>
> Another thing which might be worth trying is to see if the behaviour changes
> in a non-UTF-8 locale, e.g. export LANG=C and then run emacs.

Setting LANG=C doesn't solve the problem. And as I reported here

    http://cygwin.com/ml/cygwin-xfree/2010-03/msg00090.html

LANG=en_US doesn't solve it either.

>
> So far it seems that (1) emacs takes a long time to start up (2) xterm
> starts up quickly.  Are there other X applications that you use and how do
> they behave?

- Running "time xterm ls" (I believe 'ls' is taken to be the shell; so
xterm opens, lists the content of my homedir, and immediately closes)
reports about 2.6 of real time seconds.

- Opening xfig takes about 3-4 seconds.

- Doing "plot sin(x)" from within gnuplot takes about a second or less
to open up a window to display the graph.

- Opening xeyes takes a second or less.

- BUT opening xclock takes nearly 30 seconds (half user time, half system time).

So, as you speculated, it turns out this is not just an emacs problem.

--Dan

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-04-13 19:57           ` Markus Hoenicka
@ 2010-04-14  8:26             ` Dan Tsafrir
  0 siblings, 0 replies; 20+ messages in thread
From: Dan Tsafrir @ 2010-04-14  8:26 UTC (permalink / raw)
  To: cygwin-xfree

On Tue, Apr 13, 2010 at 17:55, Markus Hoenicka
<markus.hoenicka@mhoenicka.de> wrote:
> Jon TURNEY <jon.turney@dronecode.org.uk> was heard to say:
>
>> So far it seems that (1) emacs takes a long time to start up (2) xterm
>> starts up quickly.  Are there other X applications that you use and how do
>> they behave?
>>
>
> I've followed this thread with interest, but so far I thought I'm not
> affected. I usually start emacs along with the xserver by typing "startxwin
> /usr/bin/emacs" in the MinTTY console. This works without problems. Also,
> starting Emacs from the right-click menu of the X server in the system tray
> works fine. However, I've never noticed that starting emacs from MinTTY into
> a running X session actually takes quite some time. That is, I can confirm
> this part of the OP's problem.

I bring up X (along with the first xterm window) by using this
Windows-XP shortcut:

C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c "/usr/bin/startxwin.exe
-- -nolock"

After, I do everything through said xterm window.

Opening emacs by right clicking the X tray icon produces similar
results to doing so through the command line: it takes a very long
time.

--Dan

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-04-14  8:20           ` Dan Tsafrir
@ 2010-04-14  9:25             ` Dan Tsafrir
  2010-04-14  9:29               ` Markus Hoenicka
  0 siblings, 1 reply; 20+ messages in thread
From: Dan Tsafrir @ 2010-04-14  9:25 UTC (permalink / raw)
  To: cygwin-xfree

On Wed, Apr 14, 2010 at 10:17, Dan Tsafrir <dants@cs.technion.ac.il> wrote:
> On Tue, Apr 13, 2010 at 17:22, Jon TURNEY <jon.turney@dronecode.org.uk> wrote:
>>
>> [snip]
>> So far it seems that (1) emacs takes a long time to start up (2) xterm
>> starts up quickly.  Are there other X applications that you use and how do
>> they behave?
>
> [snip]
> opening xclock takes nearly 30 seconds (half user time, half system time).
> So, as you speculated, it turns out this is not just an emacs problem.

I wasn't able to strace emacs, but I am able to strace xclock (brining
it up, which when strace-ing takes several long minutes on my netbook,
and then immediately killing it).

The output is at:
http://www.cs.technion.ac.il/~dants/xclock-strace-output.txt.gz

Maybe this would provide a clue.
--Dan

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to  cygwin-1.7
  2010-04-14  9:25             ` Dan Tsafrir
@ 2010-04-14  9:29               ` Markus Hoenicka
  2010-04-14 11:13                 ` Thomas Dickey
                                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Markus Hoenicka @ 2010-04-14  9:29 UTC (permalink / raw)
  To: cygwin-xfree

Dan Tsafrir <dants@cs.technion.ac.il> was heard to say:

> I wasn't able to strace emacs, but I am able to strace xclock (brining
> it up, which when strace-ing takes several long minutes on my netbook,
> and then immediately killing it).
>

Neither was I. I always get this error (the error number is variable though):

strace: error creating process emacs, (error 2)

I've had a look at your strace log. I've noticed the same block of  
statements which seems to be repeated over and over again (see my  
previous post).  Did you watch the strace output on the console in  
real time to verify that this is where the process spends most of its  
time?

  3139 16066368 [main] xclock 5708 readv: readv (4, 0x22A6D4, 1)  
blocking, sigcatchers 0
  1765 16068133 [main] xclock 5708 readv: no need to call ready_for_read
  1487 16069620 [main] xclock 5708 fhandler_base::read: returning  
1024, binary mode
  1531 16071151 [main] xclock 5708 readv: 1024 = readv (4, 0x22A6D4,  
1), errno 2

This is where I have seen xterm to spend most of its time. In your  
log, this block of statements appears to be repeated several times for  
each font it checks in /etc/fonts. This would explain why it is  
related somehow to fonts in your case.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to  cygwin-1.7
  2010-04-14  9:29               ` Markus Hoenicka
@ 2010-04-14 11:13                 ` Thomas Dickey
  2010-04-14 11:42                   ` Dan Tsafrir
  2010-04-14 13:16                 ` Dan Tsafrir
  2010-04-14 21:32                 ` Ken Brown
  2 siblings, 1 reply; 20+ messages in thread
From: Thomas Dickey @ 2010-04-14 11:13 UTC (permalink / raw)
  To: cygwin-xfree

On Wed, 14 Apr 2010, Markus Hoenicka wrote:

> This is where I have seen xterm to spend most of its time. In your log, this 
> block of statements appears to be repeated several times for each font it 
> checks in /etc/fonts. This would explain why it is related somehow to fonts 
> in your case.

It's a known issue with the Athena widget set (technically in a 
lower-level library).

man xterm:

        menuLocale (class MenuLocale)
                 Specify  the  locale  used for character-set computations when
                 loading the popup menus.  Use this to  improve  initialization
                 performance of the Athena popup menus, which may load unneces-
                 sary (and very large) fonts, e.g., in a  locale  having  UTF-8
                 encoding.  The default is an empty string, which uses the cur-
                 rent locale setting.

                 Set it to "C"  to  achieve  the  best  performance  using  the
                 default  menu  resource  settings.   If you happen to be using
                 localized menu resources, set the resource accordingly.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-04-14 11:13                 ` Thomas Dickey
@ 2010-04-14 11:42                   ` Dan Tsafrir
  0 siblings, 0 replies; 20+ messages in thread
From: Dan Tsafrir @ 2010-04-14 11:42 UTC (permalink / raw)
  To: cygwin-xfree

On Wed, Apr 14, 2010 at 12:29, Thomas Dickey <dickey@his.com> wrote:
> On Wed, 14 Apr 2010, Markus Hoenicka wrote:
>
>> This is where I have seen xterm to spend most of its time. In your log,
>> this block of statements appears to be repeated several times for each font
>> it checks in /etc/fonts. This would explain why it is related somehow to
>> fonts in your case.
>
> It's a known issue with the Athena widget set (technically in a lower-level
> library).
>
> man xterm:
>
>    menuLocale (class MenuLocale)
>       Specify  the  locale  used for character-set computations when
>       loading the popup menus.  Use this to  improve initialization
>       performance of the Athena popup menus, which may load unneces-
>       sary (and very large) fonts, e.g., in a  locale  having UTF-8
>       encoding.  The default is an empty string, which uses the cur-
>       rent locale setting.
>
>       Set it to "C"  to  achieve  the  best  performance  using the
>       default  menu  resource  settings.   If you happen to be using
>       localized menu resources, set the resource accordingly.

If this really is a locale issue, then the environment variables are
being ignored from some reason; see the following shell transcript
(prompt is "bash$"):

bash$ printenv | egrep 'LANG|UTF|LOCALE'

  TEMP=/cygdrive/c/DOCUME~1/DANTSA~1/LOCALS~1/Temp
  LANG=C.UTF-8
  XTERM_LOCALE=C.UTF-8
  TMP=/cygdrive/c/DOCUME~1/DANTSA~1/LOCALS~1/Temp

bash$ LANG=C; XTERM_LOCALE=C; export LANG; export XTERM_LOCALE;

bash$ echo $LANG $XTERM_LOCALE

  C C

bash$ time xclock; # killed immediately after window opens

  real    0m42.088s
  user    0m16.030s
  sys     0m19.030s

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7
  2010-04-14  9:29               ` Markus Hoenicka
  2010-04-14 11:13                 ` Thomas Dickey
@ 2010-04-14 13:16                 ` Dan Tsafrir
  2010-04-14 14:38                   ` Markus Hoenicka
  2010-04-14 21:32                 ` Ken Brown
  2 siblings, 1 reply; 20+ messages in thread
From: Dan Tsafrir @ 2010-04-14 13:16 UTC (permalink / raw)
  To: cygwin-xfree

On Wed, Apr 14, 2010 at 12:24, Markus Hoenicka
<markus.hoenicka@mhoenicka.de> wrote:
>
> I've had a look at your strace log. I've noticed the same block of
> statements which seems to be repeated over and over again (see my previous
> post).  Did you watch the strace output on the console in real time to
> verify that this is where the process spends most of its time?
>
>  3139 16066368 [main] xclock 5708 readv: readv (4, 0x22A6D4, 1) blocking,
>       sigcatchers 0
>  1765 16068133 [main] xclock 5708 readv: no need to call ready_for_read
>  1487 16069620 [main] xclock 5708 fhandler_base::read: returning 1024,
>       binary mode
>  1531 16071151 [main] xclock 5708 readv: 1024 = readv (4, 0x22A6D4, 1),
>       errno 2
>
> This is where I have seen xterm to spend most of its time.

The two numbers at the beginning of each strace output line (like the
ones you quoted above) answer this question. I believe the first
number is elapsed microseconds since the previous line and the second
number is elapsed microseconds since the beginning of the run.

If this is correct then the block above takes about 8ms. Note,
however, that the strace log of xclock's startup is comprised of
414,669 lines, a fact that coincides with the several minutes it has
taken the straced xclock to open.

--Dan

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to  cygwin-1.7
  2010-04-14 13:16                 ` Dan Tsafrir
@ 2010-04-14 14:38                   ` Markus Hoenicka
  0 siblings, 0 replies; 20+ messages in thread
From: Markus Hoenicka @ 2010-04-14 14:38 UTC (permalink / raw)
  To: cygwin-xfree

Dan Tsafrir <dants@cs.technion.ac.il> was heard to say:

> The two numbers at the beginning of each strace output line (like the
> ones you quoted above) answer this question. I believe the first
> number is elapsed microseconds since the previous line and the second
> number is elapsed microseconds since the beginning of the run.
>
> If this is correct then the block above takes about 8ms. Note,
> however, that the strace log of xclock's startup is comprised of
> 414,669 lines, a fact that coincides with the several minutes it has
> taken the straced xclock to open.
>

Oh, I see. I never could make sense of those numbers. I've noticed  
that the problem is not 100% reproducible here. I've tried this quite  
often today, restarted the X server, tried again and so on. Sometimes  
xterm starts up fairly quick, but more often than not it starts up  
with a huge delay. Also, I've noticed that writing a log to a file  
with "strace -o file xterm", or even with "strace xterm|tee file" does  
not correctly show the kind of delay I was talking about. The  
following snippet is copied+pasted from MinTTY after running "strace  
xterm":

7551448 12884434 [main] xterm 3524 readv: readv (5, 0x2295C4, 1)  
blocking, sigcatchers 0
    59 12884493 [main] xterm 3524 readv: no need to call ready_for_read
   211 12884704 [main] xterm 3524 fhandler_base::read: returning  
65536, binary mode
    45 12884749 [main] xterm 3524 readv: 65536 = readv (5, 0x2295C4,  
1), errno 2
8089730 20974479 [main] xterm 3524 readv: readv (5, 0x2295C4, 1)  
blocking, sigcatchers 0
    57 20974536 [main] xterm 3524 readv: no need to call ready_for_read
   213 20974749 [main] xterm 3524 fhandler_base::read: returning  
65536, binary mode
    43 20974792 [main] xterm 3524 readv: 65536 = readv (5, 0x2295C4,  
1), errno 2
7699688 28674480 [main] xterm 3524 readv: readv (5, 0x2295C4, 1)  
blocking, sigcatchers 0
    62 28674542 [main] xterm 3524 readv: no need to call ready_for_read
   221 28674763 [main] xterm 3524 fhandler_base::read: returning  
65536, binary mode
    45 28674808 [main] xterm 3524 readv: 65536 = readv (5, 0x2295C4,  
1), errno 2
7870040 36544848 [main] xterm 3524 readv: readv (5, 0x2295C4, 1)  
blocking, sigcatchers 0
    54 36544902 [main] xterm 3524 readv: no need to call ready_for_read
   195 36545097 [main] xterm 3524 fhandler_base::read: returning  
65536, binary mode
    42 36545139 [main] xterm 3524 readv: 65536 = readv (5, 0x2295C4,  
1), errno 2
7927224 44472363 [main] xterm 3524 readv: readv (5, 0x2295C4, 1)  
blocking, sigcatchers 0
    57 44472420 [main] xterm 3524 readv: no need to call ready_for_read
   216 44472636 [main] xterm 3524 fhandler_base::read: returning  
65536, binary mode
    40 44472676 [main] xterm 3524 readv: 65536 = readv (5, 0x2295C4,  
1), errno 2
7598403 52071079 [main] xterm 3524 readv: readv (5, 0x2295C4, 1)  
blocking, sigcatchers 0
    55 52071134 [main] xterm 3524 readv: no need to call ready_for_read
   209 52071343 [main] xterm 3524 fhandler_base::read: returning  
65536, binary mode
    43 52071386 [main] xterm 3524 readv: 65536 = readv (5, 0x2295C4,  
1), errno 2
8083403 60154789 [main] xterm 3524 readv: readv (5, 0x2295C4, 1)  
blocking, sigcatchers 0
    57 60154846 [main] xterm 3524 readv: no need to call ready_for_read
   178 60155024 [main] xterm 3524 fhandler_base::read: returning  
51051, binary mode
    47 60155071 [main] xterm 3524 readv: 51051 = readv (5, 0x2295C4,  
1), errno 2

Please note the readv calls, some of which take around 7-8 seconds. I  
have no idea why those numbers don't show up in logs written directly  
to a file, as the overall startup time appears to be similar in both  
cases.

Anyway, we may be looking at unrelated problems. If you can't see  
readv calls with excessive times while watching the strace output,  
this may not be the cause of your problem. OTOH searching for "open"  
in your and my logs returns 62744 and 381 counts, respectively. This  
is more likely to cause the kind of delay you see.

regards,
Markus


-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to  cygwin-1.7
  2010-04-14  9:29               ` Markus Hoenicka
  2010-04-14 11:13                 ` Thomas Dickey
  2010-04-14 13:16                 ` Dan Tsafrir
@ 2010-04-14 21:32                 ` Ken Brown
  2010-04-16 20:07                   ` Markus Hoenicka
  2 siblings, 1 reply; 20+ messages in thread
From: Ken Brown @ 2010-04-14 21:32 UTC (permalink / raw)
  To: cygwin-xfree

On 4/14/2010 5:24 AM, Markus Hoenicka wrote:
> Dan Tsafrir was heard to say:
>
>> I wasn't able to strace emacs, but I am able to strace xclock (brining
>> it up, which when strace-ing takes several long minutes on my netbook,
>> and then immediately killing it).
>>
>
> Neither was I. I always get this error (the error number is variable though):
>
> strace: error creating process emacs, (error 2)

That's because /usr/bin/emacs is a symlink.  Try straceing emacs-X11.

Ken

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: emacs-x11 takes 30-40 sec to open after upgrading to  cygwin-1.7
  2010-04-14 21:32                 ` Ken Brown
@ 2010-04-16 20:07                   ` Markus Hoenicka
  0 siblings, 0 replies; 20+ messages in thread
From: Markus Hoenicka @ 2010-04-16 20:07 UTC (permalink / raw)
  To: cygwin-xfree

Ken Brown writes:
 > That's because /usr/bin/emacs is a symlink.  Try straceing emacs-X11.
 > 

Who'd have thunk? Thanks, that's going to make it easier then.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2010-04-14 21:32 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <b2c39fcb1003290333r688e2f9dm2370567a67986092@mail.gmail.com>
2010-03-29 16:15 ` emacs-x11 takes 30-40 sec to open after upgrading to cygwin-1.7 Jon TURNEY
2010-03-30  1:53   ` Dan Tsafrir
2010-04-05 21:39     ` Jon TURNEY
2010-04-13  6:46       ` Dan Tsafrir
2010-04-13  9:42         ` Bengt-Arne Fjellner
2010-04-13 11:16           ` Dan Tsafrir
2010-04-13 13:54         ` Ken Brown
2010-04-14  7:17           ` Dan Tsafrir
2010-04-13 14:30         ` Jon TURNEY
2010-04-13 19:57           ` Markus Hoenicka
2010-04-14  8:26             ` Dan Tsafrir
2010-04-14  8:20           ` Dan Tsafrir
2010-04-14  9:25             ` Dan Tsafrir
2010-04-14  9:29               ` Markus Hoenicka
2010-04-14 11:13                 ` Thomas Dickey
2010-04-14 11:42                   ` Dan Tsafrir
2010-04-14 13:16                 ` Dan Tsafrir
2010-04-14 14:38                   ` Markus Hoenicka
2010-04-14 21:32                 ` Ken Brown
2010-04-16 20:07                   ` Markus Hoenicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).