Updating tasks is very slow compared to other API calls

Hey all, hope you’re doing well.

After updating to the latest stable version of Vikunja (not sure which version I was on before), I’ve found that updating tasks appears to be much slower. I’m running on Synology DS1019+ NAS server using docker compose. My machine itself isn’t very good in the first place but previously this appeared to be running more quickly.

I’m wondering if there are any config settings I might have missed or a need to enable or disable caching or anything? Other calls appear to be pretty snappy so not sure what the issue could be or if it’s just expected.

For reference, I previously was seeing request times of like 3 or 4 seconds (I hadn’t really measured it before). Now requests are usually taking about 11, which is the reason I noticed in the first place since I have a custom Android frontend to manage my chores using a Vikunja board and it began to consistently time out when updating tasks so I had to update the timeout length.

Logs of the slow calls (can see other calls that don’t take as long as well)
Screenshot 2023-09-16 at 10.22.50 PM

Thanks for any help anyone can provide! It’s a personal project so not a showstopper or anything, so please feel free to ignore if there are more important things to look into!

New users can only embed 1 media so:

An example task that is being updated. The task is basically moved to done and then should move back into the todo column with the new due date

Also I checked and it doesn’t seem like the container should be memory or cpu bound or anything like that

That’s definitely very slow. Updating a task should take no more than 100ms and usually around 40ms. This depends on the network connection between your device and the nas. Can you check if the nas itself is the problem or the network? To do that, in your browser, have the network tab open in the dev tools (F12), update a task, then look for the update request and do right-click → copy as curl. Then run the curl command in a shell on your nas. Is that slow as well?

Thanks for the reply!

So I think a large part of the problem was that me upgrading coincided with a monthly SMART test that was running and I didn’t notice. So rather than CPU bound, I might have been bound by the load on the disks themselves? This morning, the calls are a lot faster than yesterday from my PC using curl and from the app frontend I made.

Hitting the API from the NAS itself via curl appears to take just as long as from on my pc.

Since the calls are about as fast as they had been in the past, I think this is basically resolved.

That being said, because SMART impacted it so much, I think I’m going to try installing a read/write SSD cache with a couple of drives I have laying around to see if that helps. Then I can go from there to try to get to the baseline you’ve provided (100ms would be nice haha)