Roam-Research / issues

Roam Research - A note-taking tool for networked thought.
https://roamresearch.com/
304 stars 6 forks source link

Setting {between: } to a date far in the future makes the entire application stuck and your graph slow to the point of being unusable #713

Open hochbergg opened 3 years ago

hochbergg commented 3 years ago

Describe the bug

When using the {between: } filter in a query in a Daily Note, if you set the first date to be today and the second date to be far enough in the future the Daily note becomes slow to the point of being unusable (it looks stuck). If you wait long enough it loads and you can try to do things, its possible to edit the page if you are willing to wait 10s of seconds between clicks.

The computer's CPU is at full speed for the entire time.

This means its really hard edit the daily note to remove your query, which means its hard to get out of the broken state.

To Reproduce

BE CAREFUL IN REPRODUCING THIS AS IT MAY MAKE ROAM UNUSABLE FOR YOU UNLESS YOU SPEND A FEW MINUTES FIXING IT AFTER.

Steps to reproduce the behavior:

  1. Go to a daily note.
  2. Create a query, with a between filter like so: {query: {and: [[TODO]] {not: [[query]]} {between: [[today]] [[December 31st, 9999]]}} (*)

(*) The actual query that triggered it for me was {{[[query]]: {and: [[TODO]] {not: [[query]]} {not: [[someday]]} {not: {between: [[today]] [[December 31st, 2030]]}}}}}

To get out of the state:

  1. Wait for roam to render the daily note (up to a few minutes)
  2. Double click on the query's definition (the {query...) part
  3. Wait for a few more minutes
  4. Carefully remove the 9999 part of the last date

System Information:

Additional context

The query does work, it just looks like it takes so long to render that the app is stuck.