Arc Forumnew | comments | leaders | submitlogin
Why does arc take so long to initialize?
5 points by kinnard 181 days ago | 2 comments
Why does arc (in my case anarki, but it applies across forks) take so long to initialize?

It even has the `"initializing arc.. (may take a minute)"` message.



2 points by rocketnia 178 days ago | link

One way to investigate this would be to use Racket's profiler: https://docs.racket-lang.org/profile/index.html

That tool's results are a little tricky to navigate, but there's a kind of indirect way to turn them into flamegraph SVG images via this library and flamegraph.pl: https://docs.racket-lang.org/profile-flame-graph/index.html

Racket also has some support for getting feature-specific profiling data for certain features, although I haven't tried it for anything yet: https://docs.racket-lang.org/feature-profile/index.html

I think Arc's load time is pretty typical of uncompiled Racket code. In Racket, people can speed up their development process by using `raco setup --pkgs my-package` to compile their libraries or `raco make filename.rkt` to compile individual files. That might be harder to do for Arc, especially the Arc REPL, since Arc's macroexpansion is interleaved with run-time side effects.

-----

4 points by akkartik 181 days ago | link

I'm not sure how to answer that. If you're asking what the easiest way would be to speed up initialization, it would be to load fewer libraries. Since it's an anarchic fork, we've all added lots of ideas that are good in principle but not always needed.

-----