Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous calculation loop when on certain calendar screens #206

Open
Metaroll opened this issue Dec 5, 2024 · 2 comments
Open

Continuous calculation loop when on certain calendar screens #206

Metaroll opened this issue Dec 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Metaroll
Copy link
Contributor

Metaroll commented Dec 5, 2024

Describe the bug
When there's enough period and ovulation data for the calculations to work, if you are on certain calendar screens the calculation functions will run continuously which shows up in the debug logs.

To Reproduce
Set up the calendar as shown on the screenshots and the logcat output (android studio) will show continuous debug output when on the November or December calendar pages.
If you add a period date in September then the October page will start doing the same thing also.
It won't happen on months after December until you add a period date on them as well.

Expected behavior
The calculations should only run when a new period or ovulation date is added to the calendar, or when the calendar screen is switched.
However, if they do need to run continuously, then a slower polling rate could be used e.g. calculate once every 3 seconds.

Screenshots
October
November
December
Luteal On
Logcat output - advanced
Luteal Off
Logcat output - basic

Smartphone information (please complete the following information):
(Emulated)

  • Device: [Google Pixel 8]
  • Android version: [15]
  • App version: [1.9.3]

Additional context
This is likely intentional behaviour for the calculations, but it might be causing unneccesary load which may be avoidable.
I don't think this is much of an issue really, so feel free to close this if you think so too.
But I thought I would raise in the event that it might cause slowdown on older phones.

@Metaroll Metaroll added the bug Something isn't working label Dec 5, 2024
@carstenhag
Copy link
Collaborator

Oh no, not good. Another thing to look out for once the calendar screen gets refactored. Thank you!

@Metaroll
Copy link
Contributor Author

Metaroll commented Dec 5, 2024

No worries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants