The start-up problem is a combination of two things:
* Starting with v6.3, the `plot` library is implemented with typed
classes. The compile-time part of typed classes is big and
expensive.
* The run-time system is over-eager in forcing compile-time code in
response to a `dynamic-require` of already-compiled code, so that
expensive compile-time part gets run in your generated executable.
The last bullet has been fixed for the next release, so you could try a
snapshot build. (The most recent snapshot build failed on Windows for
boring reasons, but the previous build is still available through the
"last-success" links.) Unfortunately, I don't have an easy workaround
for v6.3.
The change to `plot` also explains why generating an executable takes
so much more time and space than before. In that case, the compile-time
is needed, so it can't be skipped, but various caches help. There's
still room for improvement in the executable-generator so that it
doesn't re-expand modules so much, but I'll have to think about it
more.
Finally, I think you can avoid some unwanted influence by DrRacket and
its debugging mode on the generated executable by wrapping the call
to `create-embedding-executable` with
(parameterize ([use-compiled-file-paths (list "compiled")])
....)
It's also a good idea to pass
#:expand-namespace (make-base-namespace)
to `create-embedding-executable`.
At Fri, 8 Jan 2016 03:16:13 -0800 (PST), Alex Harsanyi wrote:
> I finally got my application [1] to build using Racket 6.3 after working
> around the problem with using plot-snip% objects [2]. Unfortunately, now
> while building the application, Racket 6.3 uses between 1.5 and 3 Gb of
> RAM, while Racket 6.1.1 only used between 0.5 and 0.8 Gb or ram to do the
> same thing. Once built, the application takes about 60 seconds or more to
> start up, compared to the version built using Racket 6.1.1 which takes
> about 3-5 seconds to start up. Once it started up, the application is just
> as responsive as the previous version, so the problem is only during
> startup.
>
> For reference, I'm using 64bit Racket versions on a Windows machine.
>
> Could someone provide some starting points for trying to diagnose the cause
> of this? I'm not really familiar with the Racket internals.
>
> BTW, if anyone wants to build the application using Racket 6.1.1, you have
> to drop the last two commits of the master branch, as they contain the
> workaround to make the code work in Racket 6.3.
>
> Thanks,
> Alex.
>
> [1] https://github.com/alex-hhh/ActivityLog2
> [2]
> https://groups.google.com/forum/#!searchin/racket-dev/plot/racket-dev/wOgQ9gdWq
> fQ/sRwkfGBMXyIJ
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-dev/47433de9-48b8-44b2-adfd-e4939db539
> 4a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-dev/568fcc98.4656620a.5a9e.1a22SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.