I\'m making an AIR application (so download time doesn\'t have a huge impact), does combining and minifing all the javascript files affect the performance? How would obfusca
Minification does improve performance for two reasons:
Reduced file-size (because it removes comments and unnecessary white-spaces), so your script loads faster. Even if it is embedded into the .
It is parsed faster, since comments and white-spaces don't have to explicitly ignored (since they're not there).
I've written quite a few HTML/JS AIR apps, and from personal experience, combining files won't make a difference. In fact, it's good practice to separate script based on certain criteria (classes, global functions, SQL functions etc). Helps keep them organised when the project becomes too big.
Obfuscating is usually a combination of minification and renaming variables. It involves using eval
to blow up the code again. This reduces performance for obvious reasons, but it depends on the size of your code.
I'd suggest running tests to understand this best for your specific situation.
[Edited to include special consideration for AIR apps]