qBittorrent
qBittorrent copied to clipboard
4.6.2 - WebUI javascript is terribly slow. profile attached.
qBittorrent & operating system versions
4.6.2 Windows 10 LTSC (10.0.1xxxx)
What is the problem?
removeTorrentFromCategoryList takes 28 seconds on maindata - other category functions take longer. Json payload is 38MB, and Chrome uses over 5GB of RAM. Just seems like an oversight and not ever benchmarked.
Steps to reproduce
F12 Chrome 1.20.0.6099.200 Create a profile and login to http://localhost:8081 Wait 3 full minutes. End profile. See that qBittorrent API responds in 3 seconds, and your local browser spins on CPU time for 3 minutes. Older CPUs are much worse.
Chrome also frequently runs out of memory when viewing all torrents.
Additional context
Gzip'd the XZ file because GitHub doesn't accept xz...
Extract the file, Chrome, F12, Performance tab, Right click the page, Load Profile... Has line numbers and everything.
Log(s) & preferences file(s)
No response
Could you provide some metrics? How many Tags, Categories, Torrents do you have in qbt?
I have submitted PR #20263, please give it a try if possible.
Could you provide some metrics? How many Tags, Categories, Torrents do you have in qbt?
I have submitted PR #20263, please give it a try if possible.
20k torrents, categories are per name and year, so very likely atleast 10k. I don't have a proper workstation infront of me at this time.
EDIT: probably 7 tags.
20k torrents, categories are per name and year, so very likely atleast 10k. I don't have a proper workstation infront of me at this time.
OK, it matches the result from the inefficient js code. Performance should be better in the submitted PR.
removeTorrentFromCategoryList takes 28 seconds on maindata - other category functions take longer. See that qBittorrent API responds in 3 seconds, and your local browser spins on CPU time for 3 minutes. Older CPUs are much worse.
It seems I only optimized removeTorrentFromCategoryList() which only is a small portion of it (28s/3min). I couldn't make sense of other profiling data... I mean I could help reviewing code if you could identify other places to look at.
If the built-in WebUI is really not working well (e.g. beyond repair), you might consider switching to a 3rd party WebUI. https://github.com/qbittorrent/qBittorrent/wiki/List-of-known-alternate-WebUIs
If the built-in WebUI is really not working well (e.g. beyond repair), you might consider switching to a 3rd party WebUI. https://github.com/qbittorrent/qBittorrent/wiki/List-of-known-alternate-WebUIs
Thank you for the open-ness. I've tried vuetorent just now, and it takes around 10s to resolve using a 1/5th the RAM. Kind of feel like I need a PHD for it which is brutal (and it's not nearly as compact), but the reduced RAM/CPU usage is likely around the fact it's paginated (even at 500 items). I guess the short is the qBittorrent WebUI can get there, just takes some reworking.
Thank you for the category optimization, it will help those power users greatly I suspect with loading time. I'm not in a position to run 5.0 at this time unfortunately.
@KyleSanderson once v5 is live (date TBD), I would love to have you collect a new profile.
@KyleSanderson once v5 is live (date TBD), I would love to have you collect a new profile.
No problem - I'd love to get back to stock. I'll probably be 2 months behind after the release as it's a major bump and that makes people nervous to permit right away.