Quote:
Originally Posted by ilovejedd
It seems when you open a "parent" folder, the "child" folders also get scanned so it can display how many items/"grandchildren" there are in the the "child" folders. That said, even with 3125 "grandchildren" inside 27 "child" folders, opening the parent folder didn't take too long (2-3 seconds).
|
I thought you were (slightly) wrong, but upon further testing I realized you weren't. The folder above my 10k file testing folder was just as slow as the folder itself. To fix that I propose this change (or something with the same end result) to make it work how I had assumed it worked:
https://github.com/koreader/koreader/pull/5819
The difference lies between just providing a rough count and actually "scanning" the attributes, whether the file's been opened, etc. of the files in the subfolder. Just giving a count is orders of magnitude faster.
Actual display could also be made rather significantly faster, at least for sorting methods like filename and date modified, but that'd require a more involved rewrite to grab such info more dynamically per page instead of all at once.
Imo there's a very good reason that no one ever noticed this performance issue though, because like I said over a 1000 files in one folder seems fairly annoying to manage even when it's fast. (Or at least that's the case for the 10k files that cause a noticeable half-second delay on my laptop.)