vscode-as3mxml icon indicating copy to clipboard operation
vscode-as3mxml copied to clipboard

Incremental Build support

Open leefj opened this issue 8 years ago • 6 comments

can you support incremental build in "vscode-nextgenas"? I have a AS3 library library project, it takes to much compile time. incremental build will really improve productivity.

leefj avatar Nov 08 '17 06:11 leefj

Can you try adding -incremental=true to the additionalOptions to see if that makes a difference in compile time? If it does, I'll add it to the regular compilerOptions.

joshtynjala avatar Nov 08 '17 15:11 joshtynjala

Actually, don't bother checking if -incremental=true works. I just gave it a try myself, and I got the following warning from AIR SDK & Compiler 27:

Warning: 'compiler.incremental' is no longer supported and will have no effect.

With that in mind, it looks like there is no way to support incremental builds with the current task system.

The ASC 2.0 compiler used by the AIR SDK (and the Royale/FlexJS compiler that was forked from it) was designed to build a SWF using the code model stored in an IDE's memory. As I understand it, Flash Builder uses this feature to build SWF files. The code model in vscode-nextgenas is powered by the Royale/FlexJS compiler fork, so in theory, it should be possible to take advantage of this same feature in VSCode.

A couple of weeks ago, I actually investigated this possibility. I didn't measure performance, but I could successfully produce a SWF file that would run in Flash Player. Unfortunately, the Royale/FlexJS compiler is missing the ability to embed fonts, and that's a pretty major limitation. Not all projects require embedded fonts, of course, but there are enough that I'm not sure it's worth spending my time working on this feature until Royale gets font embedding for SWFs (which may never happen).

joshtynjala avatar Nov 08 '17 19:11 joshtynjala

I always compile font in a single SWF,beause Chinese Font file always more than 15M , and some may more than 20M, if I embed it into a project it will compile very very very slow.

leefj avatar Nov 08 '17 23:11 leefj

incremental options do not work with jdk8

wolfired avatar Jan 11 '18 03:01 wolfired

What is the status of this issue? In my case, one project takes ~20 sec to start debugging. In FB 4.7 it takes max 10 sec.

neminovno avatar Apr 26 '19 18:04 neminovno

I don't think we're going to get something much faster than the current Quick Compile and Debug command.

Incremental builds only work with the Flex SDK and the ancient Java 6 that no one should be using anymore. Unfortunately, I can't hook into the AIR SDK compiler as closely as Flash Builder does. The Royale compiler is forked from the same codebase, but some things, like embedded fonts, were Adobe proprietary, and they wouldn't work if I hooked into that compiler's method of building from what's in memory for code intelligence.

joshtynjala avatar Apr 26 '19 19:04 joshtynjala