Skip to content

ConnectionPooling value corrections to save battery & resources? #1948

Description

@Naattukaaran

Checklist

  • I have used the search function for open and closed issues to see if someone else has already submitted the same bug report.
  • I will describe the problem with as much detail as possible.
  • 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...

return new ConnectionPool(0, 1, TimeUnit.NANOSECONDS);

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


.connectionPool(new ConnectionPool(0, 1, TimeUnit.NANOSECONDS))

.connectionPool(new ConnectionPool(0, 1, TimeUnit.NANOSECONDS))

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: possible bugIssues that seem to be a bug, but haven't been confirmed yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions