[racket] gracket 5.0.1.2 performance on OS X

From: Jakub Piotr Cłapa (jpc-ml at zenburn.net)
Date: Wed Aug 11 07:33:29 EDT 2010

On 10.08.10 20:06, Jakub Piotr Cłapa wrote:
> The behaviour stops as soon as I remove the "sleep .001" from the shell
> script (so it outputs data in big chunks). It looks to me like the event
> loop and racket thread scheduling is not working very well in the GUI
> version of racket.

I did some profiling in Instruments and gracket spends most of it time 
in CFRunLoopRunSpecific, mostly doing __CFSocketPerformV0 (a big chunk 
of which is AESend in EnsureWNEReturn) and 
mach_port_insert/extract_member. OTOH this numbers may be useless. Does 
the profiler measure time spent in the kernel? (it is based on DTrace so 
it could) Also the unix and mach system call counts reported by Activity 
Monitor are way higher than the amount of samples taken by Instruments 
during the run.

Unless Gracket is constantly adding and removing runloop sources (or 
doing some other strange thing) this probably cannot be fixed without 
tossing out the CFRunLoop (and you don't want to do this in a GUI app).

PS. An important question is whether TCP/UDP is also affected (my guess 
is "yes") and how does it work on other platforms (I will try to check 
Windows).

-- 
regards,
Jakub Piotr Cłapa


Posted on the users mailing list.