discuss-gnustep
[Top][All Lists]
Advanced

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

Re: long poll() delay


From: Stefan Urbanek
Subject: Re: long poll() delay
Date: Wed, 29 May 2002 15:39:11 +0200

Richard Frith-Macdonald wrote:
> 
> On Wednesday, May 22, 2002, at 09:26 AM, Stefan Urbanek wrote:
> 
> > Hi,
> >
> > Still having problem with long delays each time I run an application or
> > when I use a pasteboard for the first time in the app. I have traced
> > down with gdb where the delay is and it is in poll() call in NSRunLoop.
> > I have wrapped that call by NSLogs and here is the output of the
> > application:
> >
> >> openapp Farmer.app
> > 2002-05-22 10:09:29.621 Farmer[29584] Only one display per host fully
> > supported.
> > 2002-05-22 10:09:29.866 Farmer[29584] Poll start
> > 2002-05-22 10:09:49.847 Farmer[29584] Poll end
> > 2002-05-22 10:09:49.849 Farmer[29584] Poll start
> > 2002-05-22 10:09:49.850 Farmer[29584] Poll end
> > 2002-05-22 10:09:49.850 Farmer[29584] Poll start
> > 2002-05-22 10:09:49.851 Farmer[29584] Poll end
> > 2002-05-22 10:09:49.851 Farmer[29584] Poll start
> > 2002-05-22 10:09:49.852 Farmer[29584] Poll end
> > ...
> > You may see that the first poll took 20 seconds. The gdnc server is
> > already running. Subsequent poll calls are withot delay.
> >
> > And same happens when I use pateboard in the application for the first
> > time:
> > ...
> > 2002-05-22 10:09:54.822 Farmer[29584] Initialize dragging
> > 2002-05-22 10:09:54.850 Farmer[29584] Poll start
> > 2002-05-22 10:10:14.857 Farmer[29584] Poll end
> > ...
> > The pasteboard server is also running. This is really annoying for
> > example, when you select a text in a text field or start dragging.
> >
> > This is not happening when I am launching the application on localhost
> > with local display. This is happening only when running on a remote
> > display. The situation is, as I described last time, that I am running a
> > XDM session on one host from another. Everthing is being run on the host
> > 'altair': the application, two gdnc servers and two gpbs servers (one
> > for localhost and one for the another with X server)
> >
> > Is anybody experiencing the same problem?
> 
> I'd suggest running the app under strace to log system calls, and see
> what
> the poll is waiting for.
> 

Output from strace (with -rTv options) between the first two poll
NSLogs:

     0.000920 write(2, "2002-05-29 15:32:17.547 Farmer[1"..., 49) = 49
<0.000278>
     0.000659 poll([{fd=4, events=POLLOUT}], 1, 18358) = 0 <18.368170>
    18.388649 getpid()                  = 18432 <0.000007>
     0.000112 gettimeofday({1022679155, 937848}, NULL) = 0 <0.000007>
     0.000426 write(2, "2002-05-29 15:32:35.937 Farmer[1"..., 47) = 47
<0.000265>

What more information is necessary to trace where the problem is?


> My guess is it's trying to contact gdomap on the remote host, and the
> connection attempt is taking a while to time out rather than failing
> instantly.
> 
> Only after failing to find the required server on the remote host will
> it attempt to talk to an alternative on the local host.
> 

I do not understand, why it is trying to contact gdomap on the remote
host? Everything is being run on the same host, only the X serer
(display) is remote (in relation to the application).

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]