pcman-bbs / pcmanfx

Automatically exported from code.google.com/p/pcmanfx
Other
4 stars 1 forks source link

Optimize with javascript optimization tools like google closure compiler #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Javascript is inefficient

Optimize the code with javascript optimizer should help fix the problem a
little bit. However, 'const' keyword is Mozilla-specific, but this cannot
be replaced by other solutions.

Original issue reported on code.google.com by pcman...@gmail.com on 28 Nov 2009 at 2:28

GoogleCodeExporter commented 9 years ago
根據我自己的了解,使用Closure 
Compiler對於JS效能的影響應該可以說是不大,而3.6開始連
Chrome都套用Tracemonkey,JS可能會快到可以忽略的地步。 XD

如果JS需要minify的話我想主要的原因會是節省檔案大小,讓Fir
efox可以少花精神在I/O上面。
Mozilla本家已經在研究minify JS的方法,應該很快就會有結果。

唯獨要Minify JS需要注意保留原始版來符合AMO的Policy。

另外如果JS要提速和節省資源,我應該會用3.0以後支援的Javasc
ript Code Modules,把大部分
的東西都改成reusable的modules。

Original comment by sst.dre...@gmail.com on 28 Dec 2009 at 5:18

GoogleCodeExporter commented 9 years ago

Original comment by pcman...@gmail.com on 7 Sep 2010 at 2:44