ProGuard Performance - Will ProGuard make my software faster?

蹲街弑〆低调 提交于 2019-12-21 05:06:58

问题


Does anyone have experience in using ProGuard and are there already measurements about application performance beyond the class loading time?

I have a fairly complex application that could need a boost, but preparing it for ProGuard would take a few days, so I would like to hear some opinions before.


回答1:


The main benefit, from our experience, is that it can protect your intellectual rights. In terms of class loading time, we are not necessarily seeing any benefit and if so is negligible.

One other thing is we have seen issues where it can affect your code negatively. Certainly, retest your application after using ProGuard.




回答2:


Most of the bytecode optimizations that ProGuard does are done just as well or better by any mainstream JVM's JIT, so for those you shouldn't expect significant improvements (except for class loading).




回答3:


I can only make a wild guess. Pro: obfuscated and shorter method names / field names make it slightly faster in byte code validation, class loading and interpreted mode. Cons: as soon as it is running a while it will be more or less jit compiled and at that point it won't matter any more.



来源:https://stackoverflow.com/questions/6293222/proguard-performance-will-proguard-make-my-software-faster

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!