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

Ocamlbuild is too slow when using the "include" tag on many directories #4870

Closed
vicuna opened this issue Sep 18, 2009 · 3 comments
Closed

Comments

@vicuna
Copy link

vicuna commented Sep 18, 2009

Original bug ID: 4870
Reporter: louis
Status: resolved (set by @damiendoligez on 2017-02-27T13:44:59Z)
Resolution: suspended
Priority: normal
Severity: minor
Version: 3.11.1
Target version: later
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: @bobzhang @ygrek

Bug description

when there are lots of directories in your project, using "include" as an easy way to compile (given you don't have clashes between module names) leads to a very long time just to check what should be done: we got to more than 20 seconds in case there is nothing to do.

Additional information

It seems that every rule is duplicated for every possible directory, which may be at the root of the problem.

We could circumvent it by having a cleaner hierarchy: never use the tag "include", but build and link libraries instead, and use Pathname.define_context by hand for directories that need to work together.

Also, we had to add:
dep ["use_"^lib; "byte"] [lib^".cma"];
dep ["use_"^lib; "native"] [lib^".cmxa"];
for the internal libraries to be built correctly.

@vicuna
Copy link
Author

vicuna commented Sep 18, 2009

Comment author: ertai

Do you have large/deep directories with a lot of non-source files?
If it's the case avoiding to traverse them may help.

"data_dir": -traverse

@vicuna
Copy link
Author

vicuna commented Feb 20, 2017

Comment author: @xavierleroy

Un-assigning from xclerc

@vicuna
Copy link
Author

vicuna commented Feb 27, 2017

Comment author: @damiendoligez

ocamlbuild is now a separate project that lives on GitHub
PR transferred to ocaml/ocamlbuild#169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant