[plt-scheme] Slow "require"
At Sun, 20 Apr 2008 09:01:39 +0200, Mate Nagy wrote:
> Hello,
> Why is mzscheme's "require" command noticably slow?
> I'm not (only) talking about libraries from Planet; it's slow even for
> local libraries from the default distribution.
>
> For example, something like:
> (require (lib "1" "srfi"))
> takes visible time.
It shouldn't take noticeable time to load SRFI 1 from bytecode. (It
takes 8 msec on my machine.)
Maybe the bytecode files in the your installation have timestamps that
are before the source-file timestamps? The ".zo" bytecode file should
be newer than the ".ss" file, otherwise `require' uses the ".ss" source:
% cd ...plt/collects/srfi/1
% ls -l cons.ss compiled/cons*.zo
-rw-r--r-- 1 mflatt mflatt 2986 Apr 19 19:02 compiled/cons_ss.zo
-rw-r--r-- 1 mflatt mflatt 3258 Mar 17 17:50 cons.ss
[If you're using v372, then the ".zo" file will be "cons.zo" instead of
"cons_ss.zo".]
> (Btw: mred script running startup time is also really slow, even for the
> simplest "hello world" GUI apps. Is this related?)
Yes, that could be the same thing. Starting a MrEd script takes about
half a second on my machine.
Matthew