-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Background
I have around 33,000 transactions in my Actual file, dating back to 2014 (I migrated from YNAB4 to nYNAB to Actual, and was the one that made the nYNAB importer tool mentioned in the docs). I've been super happy with Actual all this time, except lately this problem has gotten bad enough to make it nearly unusable.
Problem
When editing transactions quickly (which I often do when syncing a few weeks' worth to catch up), they "flicker" back and forth as multiple full sync batches run. This happens both with and without a sync server, meaning it's related to the local-backend sync (perhaps made worse by a sync server, but not exclusive to that setup).
- I have searched and found no existing issue
Reproducing
- Start a fresh budget file
- Create a test account
- Create a few transactions in the test account, all with a category of Food
- Select all transactions and click "Duplicate" in the menu above (or press U)
- Scroll to the bottom so all the transactions load in
- Repeat steps 4-5 (which should double the transaction count each time) until there are at least 30k transactions
- You can check in the console with
(await $query($q('transactions'))).data.length
- You can check in the console with
- Refresh the page to clear out memory usage, since the problem is unrelated to how many transactions are loaded into memory
- Go to the test account, and starting at the top, change all the transactions one-by-one to General (click the category dropdown on the topmost transaction, and then type G, hit enter twice, and repeat to go down the list). Try some other edits too, as if you were going down a list of recently-synced transactions and fixing payees, typing notes, and changing categories fairly quickly.
Sample Video
I reproduced this with the above steps from a fresh budget file, and recorded a few minutes of myself doing some edits:
In the video, I:
- Showed that there are around 33k transactions
- Changed all the categories from Food to General
- Notice it's not keeping up at all
- Changed all the notes from "b" to "a"
- Waited a while for things to sync
- Notice the "Opened!" message from absurd-sql keeps printing, which makes me suspicious that the entire database is being closed and opened repeatedly
- After a while, I started again from the top and started changing categories back to Food
- At this point it's pretty much given up trying, and nothing really sticks
- Next, I start at the top and change all the amounts from $0 to $1
- Even after waiting a while, these never stick either.
Additional Details / Notes
- This happens both with and without a sync server set up
- This happens in both the desktop app and in the browser
- This happens in both Chrome and Firefox
- I'm on macOS
- If I select many transactions and make a bulk edit (like set the Cleared flag or change a category), they all apply cleanly / atomically with no flickering
- I don't know much about the details of how the syncing engine works, but my first instinct would be things like:
- Adding indexes to any tables that have grown in size with many transactions present
- Running the full sync less often, perhaps with some debounce from the last edit?
- Refusing to start another sync if one is already going on