Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Req: AOT compile more than just the main namespace #27

Open
hlship opened this issue May 2, 2023 · 0 comments
Open

Req: AOT compile more than just the main namespace #27

hlship opened this issue May 2, 2023 · 0 comments

Comments

@hlship
Copy link
Contributor

hlship commented May 2, 2023

Currently, vessel is passed a --main-class and AOT compiles that namespace and every namespace that is transitively reachable from it.

We are experimenting with improving component startup time. One of our initiatives is to replace a ns :require with a kind of placeholder component that uses requiring-resolve and a fully qualified symbol at runtime to load a namespace and execute a builder function (rather than directly execute the builder function). Combined with other changes, this will allow multiple threads to instantiate and start components in parallel.

Because of this, the component's namespace is not transitively reachable from the main namespace, as there is no longer a hard require on the namespace. Unfortunately, this means that the component's namespace is not AOT compiled.

The lack of compilation undermines the other parallelizing improvements, because the requiring-resolve has to load Clojure source and compile it, rather than load compiled code and execute it.

We would like vessel to scan the classpath for all Clojure source files, identify those that have not yet been AOT compiled, and compile each.

@hlship hlship changed the title Req: AOT compile more than just the main class Req: AOT compile more than just the main namespace May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant