Infinity-For-Reddit icon indicating copy to clipboard operation
Infinity-For-Reddit copied to clipboard

ConnectionPooling value corrections to save battery & resources?

Open Naattukaaran opened this issue 4 months ago • 0 comments

Checklist

  • [x] I have used the search function for open and closed issues to see if someone else has already submitted the same bug report.
  • [x] I will describe the problem with as much detail as possible.
  • [x] If the bug only occurs with a certain link, post, image..., I will include the URL.

App version

8.3.0-beta3

Where did you get the app from

Other

Android version

15

Device model

No response

First occurred

No response

Steps to reproduce

No response

Example post, link, markdown...

https://github.com/Docile-Alligator/Infinity-For-Reddit/blob/6b6f7bb0197bcb4cf907686e5c315dfc17da01e0/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkModule.java#L92

Saw the following recent change in Continuum and tried the change in it to a Colab build of Infinity.

https://github.com/cygnusx-1-org/continuum/blob/903c07209dee142fa74de3e4946d59245c0d7938/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkModule.java#L98

Did not use the default, but (10, 2, TimeUnit.MINUTES) instead of current value. Should it also be @Singleton?

Not sure if it had much improvement in overall battery usage, but from crude checks on the More Info in Battery Usage, the average CPU & Others sub-category usage for the app went down from 20 to 10%.

A search also showed that this was used in other places too:
https://github.com/search?q=repo%3ADocile-Alligator%2FInfinity-For-Reddit%20TimeUnit.NANOSECONDS&type=code
https://github.com/Docile-Alligator/Infinity-For-Reddit/blob/6b6f7bb0197bcb4cf907686e5c315dfc17da01e0/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubscribedThingListingActivity.java#L202
https://github.com/Docile-Alligator/Infinity-For-Reddit/blob/6b6f7bb0197bcb4cf907686e5c315dfc17da01e0/app/src/main/java/ml/docilealligator/infinityforreddit/services/SubmitPostService.java#L231
https://github.com/Docile-Alligator/Infinity-For-Reddit/blob/6b6f7bb0197bcb4cf907686e5c315dfc17da01e0/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java#L526

Not sure how useful the change would be in these 3.

Would this be acceptable as a bug report? Or would the post in discussions be enough?

Expected behaviour

No response

Current behaviour

No response

Logs

No response

Naattukaaran avatar Jul 18 '26 20:07 Naattukaaran