* [Caml-list] [PATCH] tremendously speeding up oasis builds with many executables
@ 2011-05-27 7:27 Joel Reymont
2011-05-27 7:53 ` [Caml-list] " Joel Reymont
0 siblings, 1 reply; 3+ messages in thread
From: Joel Reymont @ 2011-05-27 7:27 UTC (permalink / raw)
To: caml-list
Apply this patch to Oasis 0.2.0 to tremendously speed up builds with many executables
https://gist.github.com/994781
This will only work if your executable name matches your main, e.g.
Executable foo
MainIs: foo.ml
The patch makes Oasis 0.2.0 pass all such executables on the command line to ocamlbuild. This way ocamlbuild will be invoked once with all targets, rather than individually invoked for every executable.
This avoids building the dependency graph on every invocation of ocamlbuild. It also avoids manually reading and comparing binaries before copying them after ocamlbuild is done, e.g. the patch will skip the final copy from foo.{byte,native} to foo.
Enjoy!
--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Caml-list] Re: [PATCH] tremendously speeding up oasis builds with many executables
2011-05-27 7:27 [Caml-list] [PATCH] tremendously speeding up oasis builds with many executables Joel Reymont
@ 2011-05-27 7:53 ` Joel Reymont
2011-05-27 23:30 ` Sylvain Le Gall
0 siblings, 1 reply; 3+ messages in thread
From: Joel Reymont @ 2011-05-27 7:53 UTC (permalink / raw)
To: caml-list
To add some color...
We have 13 executables in _oasis and some libraries. That's 14 invocations of ocamlbuild, loading of the dependency graph.
That's also 14 checks to see if the target binary has changed by manually reading and comparing both binaries, plus 14 copies if source (built by ocamlbuild) changed.
Our top-level project makefile runs 'make' to build and then 'make test' to run the unit tests. This is 28 invocations of ocamlbuild and a pain in the rear during development.
After applying the patch and making sure that 'Executable foo' matches 'MainIs: foo.ml', we now have 1 and 2 invocations of ocamlbuild respectively. Needless to say, we are very happy.
--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Caml-list] Re: [PATCH] tremendously speeding up oasis builds with many executables
2011-05-27 7:53 ` [Caml-list] " Joel Reymont
@ 2011-05-27 23:30 ` Sylvain Le Gall
0 siblings, 0 replies; 3+ messages in thread
From: Sylvain Le Gall @ 2011-05-27 23:30 UTC (permalink / raw)
To: caml-list
Hello,
On 27-05-2011, Joel Reymont <joelr1@gmail.com> wrote:
> To add some color...
>
> We have 13 executables in _oasis and some libraries. That's 14
> invocations of ocamlbuild, loading of the dependency graph.
>
> That's also 14 checks to see if the target binary has changed by
> manually reading and comparing both binaries, plus 14 copies if source
> (built by ocamlbuild) changed.
>
> Our top-level project makefile runs 'make' to build and then 'make
> test' to run the unit tests. This is 28 invocations of ocamlbuild and
> a pain in the rear during development.
>
> After applying the patch and making sure that 'Executable foo' matches
> 'MainIs: foo.ml', we now have 1 and 2 invocations of ocamlbuild
> respectively. Needless to say, we are very happy.
>
I just release oasis 0.2.1~alpha1:
https://forge.ocamlcore.org/frs/download.php/626/oasis-0.2.1~alpha1.tar.gz
It contains quite a few bug fixes, especially a version of the speed up
you describe.
Cheers,
Sylvain Le Gall
--
My company: http://www.ocamlcore.com
Linkedin: http://fr.linkedin.com/in/sylvainlegall
Start an OCaml project here: http://forge.ocamlcore.org
OCaml blogs: http://planet.ocamlcore.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-27 23:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27 7:27 [Caml-list] [PATCH] tremendously speeding up oasis builds with many executables Joel Reymont
2011-05-27 7:53 ` [Caml-list] " Joel Reymont
2011-05-27 23:30 ` Sylvain Le Gall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).