Can haxe optimize SWF using link-report tech as flex compiler did?

67 views
Skip to first unread message

davy zhang

unread,
Feb 10, 2014, 10:50:25 PM2/10/14
to haxe...@googlegroups.com
In flex I can use -link-report to generate classes already used in parent swf, use generated link file to exclude these classes from the swf being loaded at compile time, by doing this can keep loaded swf smaller.

I don't know how to do this in haxe

Thanks!

davy zhang

unread,
Feb 14, 2014, 2:28:01 AM2/14/14
to haxe...@googlegroups.com
OK, I find a way to exclude classes from compile using macro like --macro exclude('Main'), works fine.
But is there any way can compiler generate a used classes report file?

Luca

unread,
Feb 14, 2014, 3:14:16 AM2/14/14
to haxe...@googlegroups.com
As long as you're not using heavily dynamic features (Lots of Reflect, Dynamic all over the place), the default dce (dead code elmination) will already be removing any of your classes that you don't use.

davy zhang

unread,
Feb 19, 2014, 2:57:48 AM2/19/14
to haxe...@googlegroups.com
Thanks for your anwser, I understand dce's work, but I am trying to load some swf at run time so I can pre-exclude some class in loaded swf as it can using the parent swf's classes definitions at runtime.

I am digging the build macro stuff to see what can I do :D
Reply all
Reply to author
Forward
0 new messages