Giter Site home page Giter Site logo

Comments (11)

alsutton avatar alsutton commented on June 26, 2024

We use it on our internal apps and we've seen the opposite. Can you share the code you ran your tests on?

from proguard.

kageiit avatar kageiit commented on June 26, 2024

You can run the example that ships with proguard itself

Fb Fork

time java -jar lib/proguard.jar @examples/proguard.pro
ProGuard, version 5.3.1
Reading program jar [/Users/kage/src/proguard/lib/proguard.jar] (filtered)
Reading library jar [/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/rt.jar]
Preparing output jar [/Users/kage/src/proguard/examples/proguard_out.jar]
  Copying resources from program jar [/Users/kage/src/proguard/lib/proguard.jar] (filtered)

real    0m8.511s
user    0m23.466s
sys 0m0.603s

Vanilla 5.3.1

time java -jar lib/proguard.jar @examples/proguard.pro
ProGuard, version 5.3.1
Reading program jar [/Users/kage/src/proguard-code/lib/proguard.jar] (filtered)
Reading library jar [/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/rt.jar]
Preparing output jar [/Users/kage/src/proguard-code/examples/proguard_out.jar]
  Copying resources from program jar [/Users/kage/src/proguard-code/lib/proguard.jar] (filtered)

real    0m8.224s
user    0m23.356s
sys 0m0.633s

from proguard.

kageiit avatar kageiit commented on June 26, 2024

I also ran a test on this opensource project
https://github.com/uber/okbuck

command to run
./buckw build another-appRelease

and then switched out the custom proguard jar from tools/proguard.jar to vanilla 5.3.1 and this fork after to check the results. I then looked at the buck build trace files

Vanilla 5.3.1
screen shot 2016-10-27 at 11 47 08 pm

This fork
screen shot 2016-10-27 at 11 47 19 pm

from proguard.

kageiit avatar kageiit commented on June 26, 2024

I think you should test vanilla proguard 5.3.1 on your internal apps to check if this fork is still useful to maintain

from proguard.

alsutton avatar alsutton commented on June 26, 2024

I'm still seeing some performance gains here, but from your experiments it looks like they may not be universal on all machines types, so I've asked for the "faster" bit to be removed from the description.

Another benchmark you might want to run is memory usage. It's an area we also see improved in the fork, and it should be independent of machine architecture and hardware configuration.

from proguard.

alsutton avatar alsutton commented on June 26, 2024

Just for comparison, here's what I see on my local machine running your test;

Original;

alsutton-mbp:proguard alsutton$ time java -jar lib/proguard.jar @examples/proguard.pro
ProGuard, version 5.3.1
Reading program jar [/Users/alsutton/Projects/proguard/lib/proguard.jar] (filtered)
Reading library jar [/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib/rt.jar]
Preparing output jar [/Users/alsutton/Projects/proguard/examples/proguard_out.jar]
  Copying resources from program jar [/Users/alsutton/Projects/proguard/lib/proguard.jar] (filtered)

real    0m13.505s
user    0m30.435s
sys 0m0.846s

Fork;

alsutton-mbp:fb-proguard alsutton$ rm examples/proguard_out.jar ; time java -jar lib/proguard.jar @examples/proguard.pro
ProGuard, version 5.3.1
Reading program jar [/Users/alsutton/Projects/fb-proguard/lib/proguard.jar] (filtered)
Reading library jar [/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib/rt.jar]
Preparing output jar [/Users/alsutton/Projects/fb-proguard/examples/proguard_out.jar]
  Copying resources from program jar [/Users/alsutton/Projects/fb-proguard/lib/proguard.jar] (filtered)

real    0m13.303s
user    0m30.040s
sys 0m0.782s

from proguard.

alsutton avatar alsutton commented on June 26, 2024

"faster" has been removed from the description.

from proguard.

kageiit avatar kageiit commented on June 26, 2024

what is "different" on your machine exactly? would be nice if we can get those speed benefits if it requires us to tweak our machines somehow

from proguard.

kageiit avatar kageiit commented on June 26, 2024

I am also curious why the changes in the fork cannot be contributed upstream to proguard

from proguard.

alsutton avatar alsutton commented on June 26, 2024

I'm not sure how valuable it'll be digging into hardware and OS components. I'm grateful for you highlighting that you have a configuration where it's not as fast, but I'm not sure a recommended hardware spec for the perf improvements would go down well with many people :).

DexGuard (authors or Proguard) are aware of this fork, but I don't know the reason they have for not taking the patches into the mainstream version.

from proguard.

alsutton avatar alsutton commented on June 26, 2024

After some further internal testing it seems the benefits of the fork become more significant if you're seeing of a lot of GC during a proguard run (usually due to JVM heap size constraints). This is probably down to the string interning patch that we have included.

from proguard.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.