When I'm viewing a folder with a few thousand files, I sometimes multiple select a few hundred files via shift right arrow. If I delete those files by hitting the delete key, XnViewMP goes CPU bound for several seconds to a minute.
I grabbed Process Monitor from http://www.sysinternals.com to try to get some insight into the problem. As expected, XnViewMP moved the files to my recycle bin. But then it did the following:
Loop
QueryDirectory of all the files in the current folder
Loop hundreds of times
RegOpenKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC\Volume SUCCESS Desired Access: Read
RegQueryKey HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC\Volume SUCCESS Query: HandleTags, HandleTags: 0x0
RegOpenKey HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC\Volume\{f
RegCloseKey HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC\Volume SUCCESS
RegQueryValue HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC\Volume\{f4ba03b0-de78-44ea-965c-70812c25a660}\Generation SUCCESS Type: REG_DWORD, Length: 4, Data: 3
RegCloseKey HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC\Volume\{f4ba03b0-de78-44ea-965c-70812c25a660} SUCCESS
End Loop
End Loop
I understand that XnViewMP doesn't call these Windows API directly. But it almost seems as thought it is querying the entire current folder once for each file I deleted. That seems very inefficient.
Comments?
0.82: Delete files slow
Moderators: XnTriq, helmut, xnview
-
- Author of XnView
- Posts: 44922
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: 0.82: Delete files slow
i've tried with a slow drive, and it takes only some seconds, do you have a big catalog file?C1879 wrote:When I'm viewing a folder with a few thousand files, I sometimes multiple select a few hundred files via shift right arrow. If I delete those files by hitting the delete key, XnViewMP goes CPU bound for several seconds to a minute.
It seems to be called by the windows function that deletes in recycle binLoop
QueryDirectory of all the files in the current folder
Pierre.
-
- Posts: 4
- Joined: Tue Jul 19, 2016 10:14 pm
Re: 0.82: Delete files slow
My drive is an SSD drive (Samsung 850 EVO). My machine has 64GB RAM, so all folders I touch get cached.
It seems that the problem is related to the fact that this folder has 1100 sub-folders. They were all empty. If I delete those sub-folders, performance is fine.
It seems that the problem is related to the fact that this folder has 1100 sub-folders. They were all empty. If I delete those sub-folders, performance is fine.
-
- Author of XnView
- Posts: 44922
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: 0.82: Delete files slow
right the problem is with many sub foldersC1879 wrote:It seems that the problem is related to the fact that this folder has 1100 sub-folders. They were all empty. If I delete those sub-folders, performance is fine.
See Issue 1038 for details.
Pierre.
-
- Posts: 8705
- Joined: Sun Oct 12, 2003 6:47 pm
- Location: Frankfurt, Germany
Re: 0.82: Delete files slow
This problem is supposed to be fixed in XnView MP 0.84 final. Could you please try and confirm the bug fix, C1879?
-
- Posts: 4
- Joined: Tue Jul 19, 2016 10:14 pm
Re: 0.82: Delete files slow
It works for me now. Thanks.helmut wrote:This problem is supposed to be fixed in XnView MP 0.84 final. Could you please try and confirm the bug fix, C1879?