[racket] how do I run profiling from DrRacket

From: Christopher (ultimatemacfanatic at gmail.com)
Date: Sun Jan 5 12:35:05 EST 2014

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

Posted on the users mailing list.