Question 1: A factor of 10 is on the high side, but not unusual at the
moment.

There's a pending issue of making sure that `for` loops or other things
are not needlessly instrumented, since they're only part of the
expansion instead of the original code. We haven't gotten back to that,
but I bet it would help with your program.

Question 2: No, unfortunately.

Question 3: If the built-in, approximate stack trace is good enough,
you can get it with

 (continuation-mark-set->context (current-continuation-marks))


At Mon, 5 Dec 2016 19:56:07 +0300, Dmitry Pavlov wrote:
> Hello,
> 
> I have a program that takes 17 seconds and ~260 MB of memory.
> If I use errortrace on it, the numbers grow about tenfold: 150 seconds and 
> 2600+ MB.
> 
> That is just compilation; in the runtime the program does almost nothing and 
> terminates quickly.
> I know little about how errortrace works and ask for help.
> My understanding of the problem is shaped into three questions.
> 
> Question 1. Is it normal for errortrace?
> 
> Note 1: I am using errortrace just for getting the stack trace of a runtime 
> error:
> 
> (with-handlers
>        ((exn:fail?
>          (lambda (e)
>            (for ((stack-elem (continuation-mark-set->list
>                               (exn-continuation-marks e) errortrace-key)))
>               ......
> 
> 
> Note 2: The program which stack trace I am interested in is require-d
> dynamically, and is actually written in non-lispy language.
> errortrace does a great job in planting its continuation marks
> into syntax objects that are generated by the parser and
> the compiler for that language.
> 
> 
> Question 2: Is there an option for errortrace to reduce its time and memory
> consumption and still provide the continuation marks for stack trace?
> I tried (profiling-record-enabled #f), it did not help.
> 
> Question 3: Is there another way to programmatically get a stack trace for a
> dynamically loaded program? Am I using a sledgehammer to crack a nut?
> 
> 
> Best regards,
> 
> Dmitry
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to