정웅이와 Flex 수다를 떨다가 labs.adobe.com 에 갔다가 CLI 매니아 눈에게 바로 들어온.
Flex Compiler Shell !!!
처음에 아무 생각없이 클릭했다가 나를 광분하게 만든 문장은 바로 이것.
It works very similarly to the mxmlc and compc command line compilers, but it compiles faster than the mxmlc and compc command-line compilers. One reason is that by keeping everything in memory, fcsh eliminates the overhead of launching the JVM and loading the compiler classes. Another reason is that compilation results (for example, type information) can be kept in memory for subsequent compilations.
잽싸 깔아보기로 한다. 아 참, fcsh은 Flex 2.0.1 이상에서만 돌아간다. 그 이하 버전을 사용하고 있다면 에러를 두두두 만나게 될 것이다. (거친마루님께서 알려주셨다)
자자 그럼 얼마나 빨라졌는지 구경할 시간
[mxmlc로 그냥 컴파일 했을 때]
[rath@desk files]$ time mxmlc MoviePlayer.mxml
Loading configuration file /home/rath/flex2/frameworks/flex-config.xml
/home/rath/files/MoviePlayer.swf (168826 bytes)
real <b>0m7.640s</b>
user 0m7.378s
sys 0m0.252s
[rath@desk files]$
[fcsh에서 컴파일 했을 때]
(fcsh) <b>mxmlc -benchmark=true MoviePlayer.mxml</b>
fcsh: Assigned <font color="blue">2</font> as the compile target id
Loading configuration file /home/rath/flex2/frameworks/flex-config.xml
Initial setup: 10ms
Loaded 8 SWCs: 846ms
Files: 334 Time: 3674ms
Linking... 28ms
Optimizing... 384ms
SWF Encoding... 175ms
/home/rath/files/MoviePlayer.swf (168826 bytes)
Total time: <b>5121ms</b>
Peak memory usage: 77 MB (Heap: 51, Non-Heap: 26)
(fcsh) <font color=#336699>(이 부분에서 MoviePlayer.mxml 소스를 살짝 고쳤음)</font>
(fcsh) compile <font color="blue">2</font>
Loading configuration file /home/rath/flex2/frameworks/flex-config.xml
Initial setup: 8ms
Loaded 8 SWCs: 17ms
Recompile: /home/rath/files/MoviePlayer.mxml
Reason: The source file or one of the included files has been updated.
Files changed: 1 Files affected: 0
Files: 334 Time: 540ms
Total time: <b>566ms</b>
Peak memory usage: 83 MB (Heap: 57, Non-Heap: 26)
Linking... 16ms
Optimizing... 177ms
SWF Encoding... 68ms
/home/rath/files/MoviePlayer.swf (168830 bytes)
Total time: <b>263ms</b>
Peak memory usage: 85 MB (Heap: 59, Non-Heap: 26)
기존 mxmlc 사용시 7.640초
fcsh 사용시 최초 빌드시 5.121초
두번째 빌드때부터는 (소스코드 고치고) 0.828초! (왕창 절약 ㅋㅋ)
매번 compile n 쳐주기 귀찮아서 리버스 엔지니어링으로 살짝 fcsh.jar (24KB)를 고쳐보았다. !를 입력하면 마지막 명령 반복을 해주고, compile 3 대신에 3만 쳐도 컴파일되고 mxmlc 의 약어 m도 먹게 고쳐놨다. 좀 더 편하고자 하시는 분은 사용해보길 바란다.
어예!
Continue Reading
Discover more thoughts and insights
김용택 시인 강연에서의 '일상을 존중하고 감동하는 삶'
건국 60주년 60일 연속 강연에서 41일차 김용택 시인의 강연 내용 일부분이다. 와이프가 동영상 20개 스크랩하는 알바를 해서 몇 편 도와주다가 보게 됐는데 경제적으로 볼 때는 시간당 5,000원도 안되는
pda에서 글 남겨보기
오랜만에 잠자리에서 4700으로 웹써핑을 하다가, 한번쯤은 pda에서 포스트를 남겨봐야 하지 않겠나하는 생각이 들었다. wm2003에서 오페라가 아주 잘돌아간다. 필기인식을 안하고 키보드를 펜으로 콕콕 찍는 것이
여기는 KLDP CodeFest!
여기는 가락동에 위치한 KIPA 입니다. 시민쾌걸 온라인 팀에 SK-VM 구현도 만들어볼겸, 이분 저분 구경도 하고 만나도 보기 위해 들렀습니다. 코드페스트는 올때마다 언제나 재미있습니다 -ㅅ-. 제가 사용하는