BowlerHatLLC / vscode-as3mxml

ActionScript & MXML language extension for Visual Studio Code. Develop apps for Adobe AIR, Adobe Flash Player, or Apache Royale.
https://as3mxml.com/
Apache License 2.0
257 stars 40 forks source link

Reduce compiling time when unpacking ANEs #689

Closed ylazy closed 1 year ago

ylazy commented 1 year ago

Whenever I make a minor change to a class then ctrl+enter to run:

(fcsh) compile 1
Loading configuration: E:\Development\ActionScript\SDK\AdobeAir\Windows\50.2\frameworks\air-config.xml

1877737 bytes written to E:\Development\ActionScript\Projects\VSCode\bin\Main.swf in 3.010 seconds
Compile status: 0
Elapsed time: 3.0155627 seconds
E:\Development\ActionScript\SDK\Ylazy\Core\Libs\as3\src\ylazy\core\topLevel\utils\ClassTool.as:120: Warning: Use of the instanceof operator.  The instanceof operator is deprecated, use the is operator instead.

            return (thisClass === isDescendantOfClass || thisClass.prototype instanceof isDescendantOfClass);

In this case, the output is blank for about 12s, until Loading configuration: E:\Development\ActionScript\SDK\AdobeAir\Windows\50.2\frameworks\air-config.xml is displayed. Then 3s for compiling.

Is there anyway to cache configurations or even everything before compiling, to get faster compilation? I don't know why but Adobe Animate is 2x faster with the same code:

https://github.com/BowlerHatLLC/vscode-as3mxml/assets/6010183/6c7c8f05-8248-4ba6-a0c9-1a5616dffc13

Thanks!

joshtynjala commented 1 year ago

If you enable as3mxml.asconfigc.verboseOutput in VSCode's settings, you should see more detail about what is happening during the build process.

There are several tasks that could happen before compilation starts. Not all of them apply to every project, but it could certainly be some of these things that are taking a bit of time:

ylazy commented 1 year ago

Thank you for the response & sorry for long delay! After many days I finally find out what "eaten" ~12s of my compiling time:

Extracting native extensions for debugging

The WebViewANE (FreSharp.ane + WebViewANE.ane) takes too long time for extracting.

image

I think it's not necessary to extract native exensions again and again. It should be extract once and cache for the next time of compiling. These anes could be re-extracted if the date modified changes.

Could you consider to make a fix for this?

Thank you!