MXMLCTask and COMPCTask should only execute if code is outofdate
Closed this issue · 4 comments
In large projects compiling only the modules that have changed will save a lot of execution time.
That should be the case today. If you edit some code and run rake, you'll see the mxmlc command reflected in the terminal. If you run rake again before editing any source files, it should simply launch the Flash Player.
If you're referring to a project that has multiple modules that refer to source files in the same source path, the only way I can think of to discover these dependencies would be to actually build an AST first - Rake itself doesn't know anything about ActionScript, it's just checking timestamps for files within the source path against the file that gets created...
With all that said, you might see a performance boost by setting:
keep_generated_actionscript=true
If I remember correctly, this will store the compiled bytes on disk between compilations and do something more like what you might be asking for....
Please let me know if I should close this issue.
Thanks!
Luke
I have several tasks that compile SWF and SWC; and am not getting the expected behavior where compc and mxmlc only run when codes changes. My ruby kungfu is rather weak, but here is a snippet of my rake tasks (http://gist.github.com/344605). The src folder and output are in different locations, so the timestamps for those source files are not affected. Initially, I thought that the .cache files was causing the recompiled, but turning off "incremental" did not make a difference. Instead, I ended up extending MXMLCTask with something like this (http://gist.github.com/344607).
~Pete
Hey Pete,
I'm suspicious of the 'tool_task_model' task...
Can you send a gist of how that's defined?
Some notes:
- The feature you're looking for only works for Rake Tasks that extend Rake::FileTask.
- The Sprout base class ToolTask does extend this, and the idea is that other files need to be added as prerequisites to that task.
- Here's a great article on Rake: http://martinfowler.com/articles/rake.html
Btw - Your Ruby code looks great to me!
This should be fixed in 1.1.x, please let us know if you still see this problem at projectsprouts@googlegroups.com