Question

I'm building a game with Haxe and NME. My code was compiling pretty quickly, but then I added the Nape physics engine with haxelib and now my compile time has increased by quite a lot.

My guess is that the Nape library is being recompiled every time, since it looks like the output is a single swf file, and removing the library reduces compile time back to what it was.

Is it possible to compile Nape once and not have to keep recompiling it every time I build? Is the solution different for the Neko target?

Was it helpful?

Solution

I don't use NME, so i'm not sure how this fits into NME's build tools, but with plain haxe you would use a build server, eg:

haxe --wait 4000

to start the server, and then when building, add

--connect 4000

For as long as the build server is running and being used, the compiler will cache the results of compiling modules, so things like nape will only be compiled the first time round, and for as long as code is not changed, the only thing compiler will do is generate the .swf

OTHER TIPS

It fits pretty well in OpenFL/NME tools

haxe --wait 5000

openfl build flash --connect 5000

But note that currently it may not work for:

openfl build windows|mac|linux|android|ios|blackberry --connect 5000

Currently this feature doesn't supported for cpp targets.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top