kalaspuffar / secure-quick-reliable-login

This repository is an implementation for SQRL (Secure Quick Reliable Login) on Android.
MIT License
116 stars 29 forks source link

Improve GRADLE build Performance #491

Closed shisheng-1 closed 2 years ago

shisheng-1 commented 2 years ago

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. We can fork a new test VM after a certain number of tests have run by setting forkEvery.

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

kalaspuffar commented 2 years ago

Hi @shisheng-1

Thank you for the addition. We don't run that many tests yet, but this is a good addition if we add more tests in the future. I've not used this feature myself, so I can't vouch for its importance.

Perhaps @alexhauser knows more about this feature and could weigh in with his thoughts.

Best regards Daniel

alexhauser commented 2 years ago

I'm really not an expert when it comes to gradle build scripts, either.

In general, I'm not a big fan of premature optimizations or fixing non-existing (or not yet existing) problems.

@shisheng-1, can you please elaborate what adding this option will do for us at this point?

shisheng-1 commented 2 years ago
Hi @alexhauser
I tested the time by ./gradlew test, see the data here:
with forkEvery without forkEvery
1m 49s 2m 47s
alexhauser commented 2 years ago

Thanks for elaborating, @shisheng-1! This actually does look like a substantial improvement, so LGTM @kalaspuffar!