ProGuard Performance - Will ProGuard make my softw

2019-03-29 19:37发布

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.

3条回答
一夜七次
2楼-- · 2019-03-29 19:47

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楼-- · 2019-03-29 20:11

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.

查看更多
贼婆χ
4楼-- · 2019-03-29 20:13

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.

查看更多
登录 后发表回答