Very slow compilation of new empty OpenFL project

Hi everyone.

can’t seem to get OpenFL to work fast. I remember a year ago it worked as fast as regular flash, however now it slowed down to unreasonable level.

Here are the steps:

OpenFL (libraries: openfl\2,2,6 lime\2,1,1 actuate\1,8,2):

  1. Create new OpenFL Project in FlashDevelop (4.7.1.1).
  2. Set to Debug, flash.
  3. Press “Test Project” (cmd: “C:\HaxeToolkit\haxe/haxelib” run lime build “project.xml” flash -debug -Dfdb)
  4. Takes about 5 seconds to build.
  5. Tried using haxeflag name="–connect 6000". Also 5 seconds.

Regular AS3 Flash Project:

  1. Create new AS3 Project in FlashDevelop (4.7.1.1).
  2. Set to Debug, flash.
  3. Press “Test Project”.
  4. Builds almost instantly.

Haxe Flash Project: same speed as AS3 Flash Project.

So, does anyone know why lime compilation could take so long?

5 seconds doesn’t sound that bad to me. Don’t forget that Haxe uses a different compiler to regular as3 projects so it’s likely to take a different amount of time.

Does it make a difference if you test building from the Command Prompt? Is this a project with no assets?

About 4 seconds using: openfl build project.xml flash.
Here is screenshot of all project files: http://pasteboard.co/1fdsABrD.png

I wonder if this is running the “assets.swf” build or not

In the past, we used to run a single SWF build in memory, but this hit some hard (and bad) size limits for large projects. In order to resolve this, assets are now compiled to another SWF separately, then the project is compiled, linking this first SWF.

Another change is that Haxe 3 is slower than Haxe 2, it adds a lot of improvements/safety but lost some gains in the performance department. Not sure if the next release changes this at all.

Third, the OpenFL tools are not currently performance tested, only tested for consistency/accuracy, so there may be some areas that could be improved (they probably are there) to keep things zippy.

What if you do -verbose while you build, does it seem to hang on one thing, or does it seem to zip along pretty consistently?

Thanks for the response. I’m asking because my project reached ~8-12 second compilation time and it kinda breaks the flow if i want to test out something quickly. And with flash projects it takes about 1-3 seconds for larger projects with lots of assets.

Also tested regular Haxe Flash Project. It is as fast as Flash AS3. So it couldn’t be Haxe 3 fault.

Here are the approximate times:

~2.5 seconds:
cmd: “C:\HaxeToolkit\haxe/haxelib” run lime build “project.xml” flash -debug -Dfdb

~2 seconds:
haxelib run lime run “project.xml” flash -debug

–times:
Total time : 0.353s

filters : 0.064s, 18%
generate swf : 0.065s, 18%
macro execution : 0.025s, 7%
module cache check : 0.136s, 38%
other : 0.002s, 1%
parsing : 0.001s, 0%
typing : 0.024s, 7%
write swf : 0.036s, 10%

Full output: http://pastebin.com/uCcREkgU