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

Delay JS program optimizations in Lam_compile_main until JS generation #464

Open
anmonteiro opened this issue Jan 4, 2023 · 2 comments · May be fixed by #475
Open

Delay JS program optimizations in Lam_compile_main until JS generation #464

anmonteiro opened this issue Jan 4, 2023 · 2 comments · May be fixed by #475
Milestone

Comments

@anmonteiro
Copy link
Member

Might allow to build more things concurrently, which will improve the Dune build plan, as per ocaml/dune#6698 (comment)

@rgrinberg
Copy link

Some criteria that we should use for delaying work to the .js generation step:

  1. The work should never raise. That is, all error checking should be done at the creation of the .cmj
  2. The work shouldn't have to do many look ups in the environment. Otherwise we'll need to reload the environment when generating the .js and that can be quite expensive. We'll also need to change the rules to include dependencies on said environment.

Aside from the rules above, we should delay as much work as possible.

@ELLIOTTCABLE
Copy link
Contributor

Hm.

That is, all error checking should be done at the creation of the .cmj …

That seems concerning, unless there's no way for emitting a require to error? (thinking here in terms of virtual libraries, ocaml/dune#7104.)

@anmonteiro anmonteiro added this to the Melange v3 milestone Oct 19, 2023
@anmonteiro anmonteiro modified the milestones: Melange v3, Melange v4 Jan 4, 2024
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

Successfully merging a pull request may close this issue.

3 participants