MantisBT - Doomseeker
View Issue Details
0003638Doomseeker[All Projects] Suggestionpublic2019-04-30 20:392019-07-30 10:13
Pol M 
Pol M 
normaltweakalways
closedfixed 
LinuxArchx86-64
1.2 
1.31.3 
0003638: Cache files checked on PathFinder::findFile to allow for a more efficient multi-file search
Caching the files will allow for a faster lookup in multi file searches. That is specially useful to speed up the PWAD tooltip.
This also means that the PathFinder must not be destroyed in the tooltip lookup.
No tags attached.
child of 0003625closed Pol M Servers with lots of (big) WADs may take a long time to display the WADs column tooltip on server browser 
Issue History
2019-04-30 20:39Pol MNew Issue
2019-04-30 20:39Pol MStatusnew => assigned
2019-04-30 20:39Pol MAssigned To => Pol M
2019-04-30 20:39Pol MRelationship addedchild of 0003625
2019-04-30 20:46WubTheCaptainSeverityminor => tweak
2019-04-30 20:46WubTheCaptainNote Added: 0020579
2019-04-30 21:51Pol MNote Added: 0020583
2019-04-30 23:46Pol MNote Added: 0020584
2019-04-30 23:47Pol MNote Edited: 0020584bug_revision_view_page.php?bugnote_id=20584#r12538
2019-04-30 23:52Pol MStatusassigned => needs review
2019-05-01 00:02Pol MNote Edited: 0020584bug_revision_view_page.php?bugnote_id=20584#r12539
2019-05-01 08:50ZalewaNote Added: 0020586
2019-05-01 13:49Pol MNote Added: 0020592
2019-05-13 19:58Pol MNote Added: 0020649
2019-05-19 10:27ZalewaNote Added: 0020668
2019-05-19 10:27ZalewaStatusneeds review => needs testing
2019-05-31 14:24Pol MStatusneeds testing => assigned
2019-05-31 14:26Pol MNote Added: 0020710
2019-06-01 11:16Pol MStatusassigned => needs review
2019-06-01 11:16Pol MNote Edited: 0020710bug_revision_view_page.php?bugnote_id=20710#r12608
2019-06-02 09:14Pol MNote Edited: 0020710bug_revision_view_page.php?bugnote_id=20710#r12609
2019-06-02 09:14Pol MStatusneeds review => needs testing
2019-06-08 19:41Pol MNote Edited: 0020710bug_revision_view_page.php?bugnote_id=20710#r12631
2019-06-09 19:22ZalewaNote Added: 0020736
2019-06-12 00:36WubTheCaptainNote Added: 0020746
2019-07-22 09:14WubTheCaptainNote Added: 0020904
2019-07-22 09:14WubTheCaptainStatusneeds testing => resolved
2019-07-22 09:14WubTheCaptainFixed in Version => 1.3
2019-07-22 09:14WubTheCaptainResolutionopen => fixed
2019-07-30 10:13WubTheCaptainStatusresolved => closed

Notes
(0020579)
WubTheCaptain   
2019-04-30 20:46   
Quote from Pol M
Originally with this ticket I played around with the idea of caching the files of directories already explored, allowing us to cut a lot of time in certain cases. Maybe I'll explore the concept further.


I kind of prefer it being real-time as it is right now. I've found it useful on multiple occassions while moving files, no need to restart Doomseeker to see if the file exists at that path. The alternative offered is to disable telling where the paths are located, in settings.
(0020583)
Pol M   
2019-04-30 21:51   
No, I'm not saying to cache all the wads at load time. I'm talking about Caching the search results of one item in the tooltip to be able to reuse them in the next item of the tooltip. This reduces access to the hard drive significantly at the expense of a little bit of ram. The next time you hover your mouse over a server PWAD list said cache will be long gone, so no worries about having to reset ;)
(0020584)
Pol M   
2019-04-30 23:46   
(edited on: 2019-05-01 00:02)
PR

This should give you an idea. I'm getting 0-5ms now.
EDIT: Wub, if you can, please check how this affects your setup.

(0020586)
Zalewa   
2019-05-01 08:50   
On Windows I don't see any significant difference between your implementation and the previous one that used the CaseInsensitiveFSFileSeeker class. In fact - it is now slightly worse as the times for servers with low WAD count are now the same as times for servers with high WAD count (but still it's just 10ms for me). The new implementation loads listings of all directories into memory (regardless of the OS), while the old implementation for Windows only checked if particular path exists case-insensitively. And - because NTFS is case-insensitive - it performed better.
(0020592)
Pol M   
2019-05-01 13:49   
Huh, then I'll roll back the implementation on Windows. 10ms is still excellent, but if a better option exists then we should take it.
(0020649)
Pol M   
2019-05-13 19:58   
Done!
(0020668)
Zalewa   
2019-05-19 10:27   
PR is merged (through a direct merge this time)
(0020710)
Pol M   
2019-05-31 14:26   
(edited on: 2019-06-08 19:41)
I'm experiencing some crashes with the IWAD column having the IWAD on a recursive path. I'll be working on it.
Fixed.
Merged.
Followup commit to fix another issue: the files returned were lowercased.

(0020736)
Zalewa   
2019-06-09 19:22   
The fix PR merged here:'https://bitbucket.org/Doomseeker/doomseeker/commits/11f5ecc954fd4fdd495928cf45bb9f25e152972c [^]'
(0020746)
WubTheCaptain   
2019-06-12 00:36   
Quote from Pol M
Wub, if you can, please check how this affects your setup.


Sorry, I haven't had time. I subscribed to this issue to remind myself, but I still haven't got around to do it. Apologies.

I'll update this ticket if and when I'll do the testing.
(0020904)
WubTheCaptain   
2019-07-22 09:14   
Quote from Pol M
I'm getting 0-5ms now.
EDIT: Wub, if you can, please check how this affects your setup.


I'm experiencing similar results. 1.3~beta-190720-1414 feels snappy and fast to me. So I guess this is resolved?

I didn't benchmark memory usage or anything like that.