yabai

2月がもう終わる!

by typester / at 2007-02-28T10:28:00 / life / Comment

コンパイル時間参考

swc使用

(fcsh) mxmlc -benchmark -include-libraries=../flexunit/bin/flexunit.swc main.mxml
fcsh: Assigned 12 as the compile target id
Loading configuration file /home/typester/app/flex/frameworks/flex-config.xml
Initial setup: 62ms
Loaded 9 SWCs: 8485ms
Files: 435 Time: 21804ms
Linking... 815ms
Optimizing... 427ms
SWF Encoding... 862ms
/home/typester/tmp/flexunit/test/main.swf (241615 bytes)
Total time: 32459ms
Peak memory usage: 387 MB (Heap: 358, Non-Heap: 29)

ソースから

(fcsh) mxmlc -benchmark -source-path=../flexunit/src/trunk/src/actionscript3 main.mxml
fcsh: Assigned 13 as the compile target id
Loading configuration file /home/typester/app/flex/frameworks/flex-config.xml
Initial setup: 66ms
Loaded 8 SWCs: 3169ms
Files: 433 Time: 57148ms
Linking... 25ms
Optimizing... 394ms
SWF Encoding... 297ms
/home/typester/tmp/flexunit/test/main.swf (239897 bytes)
Total time: 61109ms
Peak memory usage: 399 MB (Heap: 371, Non-Heap: 28)

長すぎる。VMだからメモリ足りないからかもしんない。

by typester / at 2007-02-28T10:18:00 / as3 / Comment

AS3のテスト

Adobe - Developer Center : Unit testing and Test Driven Development (TDD) for Flex and ActionScript 3.0

これ試してみた。

Flex Builder 2 がいるとか書いてあるけど、Flex2 SDK でも使えた。

この記事の例のをコンパイルするには

mxmlc -include-libraries=../flexunit/bin/flexunit.swc main.mxml

こんな感じでいいよう。

-include-libraries の代わりに -source-path で as ライブラリの位置指定してもいけるけどコンパイル時間がすげー長くなってしまう。

てか、swc 使っても長いんですけど。fcshつかった二回目以降のコンパイルでもおっせぇのでFlexって大変だなぁとか思ったり。

このテストアプリはFlexで作られているけど、テストは普通のAS3クラスに対して行えるので、まぁ一応使えるかなぁと言う印象。

作ってるアプリディレクトリに test.mxml、Test.as を置く感じになるかなぁ。

めんどいなー。誰かがasだけでテストクラス書いてくれるのを待とう。

by typester / at 2007-02-28T10:00:00 / flash · as3 / Comment