liato / android-bankdroid

A swedish banking application for your Android device.
http://www.swedroid.se/forum/showthread.php?t=11108
Other
242 stars 173 forks source link

Improve GRADLE build Performance #691

Open ChenZhangg opened 2 years ago

ChenZhangg commented 2 years ago

Parallel test execution maxParallelForks, running multiple test cases in parallel is useful and helpful when there are several CPU cores.

According to Process forking options, Gradle will run all tests in a single forked VM by default. This can be problematic if there are a lot of tests or some very memory-hungry ones. one option is to fork a new test VM after a certain number of tests have run. So our recommendation is to configure "forkEvery" and we give a specific value of 100

Disable report generation, Gradle will automatically create test reports by default which will slowing down the overall build. So it's better to disable the test reports while we don't need it

Incremental compilation, We note that the gradle version for this project is smaller than 4.10, so we recommend enabling this configuration to shorten build times

===================== If there are any inappropriate modifications in this PR, please give me a reply and I will change them.

elestedt commented 2 years ago

Parallel execution is faster, but it is also scary and a potential source of test flakiness.

Can you give before and after performance numbers for the tests? How much time is being saved here?

Also, please detail how you ensured this change doesn't make the tests flaky.

@ChenZhangg what problem is it that you are trying to solve?

The author has placed similair PRs on 30 or so different projects. I can only speculate as to motives, but a few of them makes it clear that no actual benefit analysis has been made before submitting. In one instance there were no tests to optimize...

walles commented 2 years ago

It's actually 106 PRs since August 23:

https://github.com/pulls?page=1&q=is%3Apr+author%3AChenZhangg+archived%3Afalse+improve

I vote for just closing this.

@ChenZhangg any comments?