Thanks Ryan, the macro profiler is great! It quickly identified a macro
that I was able to convert to a procedure. (I'm not sure why I made it a
macro in the first place.) And the .zo file decreased from about 910KB to
130KB, and the compilation speed went from 40 seconds to about 8 seconds
One thing to check is the size of the resulting bytecode file. When I
compiled it, I got a 911 KB .zo file. So the most likely reason is that
your macros are just producing a lot of code.
You can run the macro profiler (eg, `raco macro-profiler aw-schema.rkt`) to
get a summary of what macros
40s to compile seems rather excessive, considering macros like match that also
do a lot of work are instant, almost regardless of their size (I once managed
to generate a 2000 line (match ...) and hardly noticed). Is there anything in
define-schema that makes it non-linear? Do you process
Using DrRacket, the following file takes 18 seconds to compile without
debugging, or about 40 seconds to compile with
debugging:
https://raw.githubusercontent.com/default-kramer/plisqin-tutorials/e844825b48137553246c64e73516d880b9068825/define-schema-answer-key/aw-schema.rkt
When I say
4 matches
Mail list logo