TechbeeAT / jtxBoard

jtx Board allows you to manage your Journals (like meeting minutes), Notes and Tasks in one Android app. The app is compatible with the iCal standard (RFC5545) and is integrated with DAVx5 to allow the synchronisation of entries through CalDAV.
https://jtx.techbee.at/
GNU General Public License v3.0
388 stars 10 forks source link

[BUG] App not responding when creating repeating task #466

Closed mueller-ma closed 1 year ago

mueller-ma commented 1 year ago

Describe the bug Create a task that is repeated every day for ever. The edit view isn't responding anymore then, because the app creates a list of all occurrences which consumes a lot of CPU. Maybe this list should be limited by:

To Reproduce Steps to reproduce the behavior:

  1. On the new event screen enter a start date
  2. Select "repeat every 1 day forever"

Expected behavior The app still performs good.

Device and version:

patrickunterwegs commented 1 year ago

Hey @mueller-ma , thanks, indeed there was a change with from 2.2.x to 2.3.x, before the recurring entries were limited to 100, now the entries are limited to a certain timeframe when using unlimited recurrences:

...
Recur.Frequency.DAILY -> it + (365).days.inWholeMilliseconds
Recur.Frequency.WEEKLY -> it + (365).days.inWholeMilliseconds
Recur.Frequency.MONTHLY -> it + (3650).days.inWholeMilliseconds
Recur.Frequency.YEARLY -> it + (3650).days.inWholeMilliseconds

So for a daily recurrence the app would make instances for the 365 days from now, I guess in your case 365 entries would have been created. I am wondering a bit why this caused that problem for you, even in the emulator (which is rather slow) this didn't cause any problems. May I ask you what device you are using? Is this problem reproducible / does it occur every time when you're using unlimited recurrences?

Sure I can reduce the timeframe for dialy recurrences, for example to a month?/quarter?/half a year?, but I would rather like to keep a value that is kind of consistent and comprehensible for the user...

mueller-ma commented 1 year ago

I'm using a Fairphone 3 and it happens every time when I create a task with unlimited recurrences.

Another solution would be to create this list async and show a loading indicator.

For me it's not very useful to have a list of 365 dates, so I'd say displaying 100 dates should be fine. But it's up to you.