xlib functions seems slow

Iban Hatchondo hatchond at labri.fr
Sun Feb 2 22:56:01 UTC 2003


--- Christian Lynbech <christian at defun.dk> wrotes:
 >I have been playing around with latest eclipse from the CVS repository
 >and have stumbled across a strange behaviour.

 >I have defined a small function to return all applications:

 >(defun application-list ()
 >  "Return the applications objects as a list."
 >  (loop for val being each hash-value in *widget-table*
 >	  when (and (application-p val) (application-master val)) collect val))

 >and another to extract their names:

 >(defun application-name (app)
 >  (xlib:wm-name (widget-window app)))

[ ... ]

 >* (time (application-name x))
 >    Compiling LAMBDA NIL:
 >    Compiling Top-Level Form:
 >    Evaluation took:
 >      1.02 seconds of real time
 >      0.0 seconds of user run time
 >      0.0 seconds of system run time
 >      4 page faults and
 >      760 bytes consed.


 >I forgot to mention that this was from a telnet session.
 >
I noticed the same "performance" problems. But I have the impression, 
that it is something from the telnet session. If you try to play with 
your mouse pointer around the telnet window (ie: exit/enter quickly) you 
can change the result see below:

Th first result comes without moving my mouse pointer. The second result 
comes after my mouse pointer came back in the telnet window.

* (time (application-name x))

Evaluation took:
   1.0 seconds of real time
   0.0 seconds of user run time
   0.0 seconds of system run time
   0 page faults and
   0 bytes consed.
"madiun"
:STRING
8
0
* (time (application-name x))

Evaluation took:
   0.08 seconds of real time
   0.0 seconds of user run time
   0.0 seconds of system run time
   0 page faults and
   0 bytes consed.
"madiun"
:STRING
8


 >I have now found out that if I break the main eclipse process and
 >repeat the experiment from the break loop, it goes blindingly fast as
 >I would expect it to so presumably the problem is in the mixture of
 >the telnet stuff and the CLX stuff.
Yes.

 >I am still curious as to whether I can fix it somehow
That would be great ! It seems to be a problem of buffer not flush 
somewhere in the mp package or something like this.

 > , but I no longer fear any problems in using such functions in 
extensions to eclipse.

Also thank you, for the patches. I'll incorpore them in a fiew minutes.

!ban.







More information about the eclipse-devel mailing list