[racket] how do I run profiling from DrRacket

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Sun Jan 5 13:39:01 EST 2014

Don't run profiling within drracket. DrRacket is a wonderful IDE 
(and I use it on a daily basis for almost all my Racket programming)
but profiling in drracjet is broken and unreliable in information
gathering. (Keep in mind that DrRacket is an OS running atop of an
OS (linux, windows, mac), which poses many problems for accurate 
timing.) See

 http://docs.racket-lang.org/guide/performance.html?q=performance&q=time&q=profile

for the note on timing results in drracket (and why performance in
drracket is slow). 

Instead use the profiling module: 

  http://docs.racket-lang.org/profile/index.html?q=profile#%28mod-path._profile%29

I am sure you will recover the performance you imagined. 


On Jan 5, 2014, at 12:35 PM, Christopher wrote:

> Greetings, racketeers.
> 
> I have recently completed a port of most a large scripting language program I wrote (large by my standards, which is on the order of tens of thousands of lines of code) into pure Racket from some other scripting language, with the object of getting faster execution.
> 
> Now that enough of the port is finished to begin testing and verification, I'm not seeing the performance gains I expected. I have some suspicions about where some bottlenecks may be, but I'd like to have more data. To that end, I'd like to run some profiling on my code as it's running. 
> 
> There appears to be some way to run profiling from DrRacket, but I can't discover the correct way to do this, for the things I'm trying bring forth strange errors when I try to run the program.
> 
> I try to turn on profiling from the Choose Language menu item under Dynamic Properties, but when I select debugging and profiling, then weird errors appear that didn't happen when I had just debugging selected.  
> 
> For example, an identifier defined by a module imported with "require" is suddenly complained about as being undefined. An other thing that happens is this cryptic message:
> 
> link: module mismatch;
> possibly, bytecode file needs re-compile because dependencies changed
>  importing module: "/Users/christopher/Programming/Racket/organ-relay-sim/packages/organ-relay-sim/myhdl/private/delay-join.rkt"
>  exporting module: "/Users/christopher/Programming/Racket/organ-relay-sim/packages/organ-relay-sim/myhdl/private/generator.rkt"
>  exporting phase level: 0
>  internal explanation: variable not provided (directly or indirectly and at the expected position) in: stop-iteration1.1
> 
> That does not happen when just debugging is selected.
> 
> Any advice would be appreciated.
> 
> Thanks!
> 
> —Christopher
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users



Posted on the users mailing list.