Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Slow deletion of files

04 Aug 2013   #21
UsernameIssues

W7 Pro SP1 64bit
 
 

I re-read the Calibre thread again and I'm wondering if this might help:
SFC /SCANNOW Command - System File Checker

I did not see where you had tried that before.


My System SpecsSystem Spec
.
04 Aug 2013   #22
jlauret7

Windows 7 Professional
 
 

Quote   Quote: Originally Posted by UsernameIssues View Post
I re-read the Calibre thread again and I'm wondering if this might help:
SFC /SCANNOW Command - System File Checker

I did not see where you had tried that before.
I did try this yes (and the whole slew of usual first tries) - no problems found :-( . For good measure, I did it again before posting this (still comes clean, no integriry violation).

I saw your post on trying Calibre - thanks for that (Kovid probably got no delays as you observed). I have a gap of 40 seconds delay with Calibre (20 seconds with DeleteXP) and no clues of what those programs are doing/waiting for during that excruciatingly long time (Process Monitor shows pages and pages of calls in that 20 seconds window as you may guess).

If there is a programmer reading this, would be nice to have the speculation of SHFileOperation() versus the newer IFileOperation() validated (tried). I can't compile but would be willing to test a provided program.

My best bet seems to be the Clean Boot as you suggested and trying to trace again (will do later in the day as I need my computer now ... if there are more quick checks, I can do it "in between"). If I finally find the issue, I will report hoping it will save others some time.
My System SpecsSystem Spec
04 Aug 2013   #23
Ztruker

Windows 10 Pro X64
 
 

Why use DeleteXP when you can use the built in delete (del) command? If it's a really old program, perhaps that is why you are having problems with it?
My System SpecsSystem Spec
.

04 Aug 2013   #24
jlauret7

Windows 7 Professional
 
 

Quote   Quote: Originally Posted by Ztruker View Post
Why use DeleteXP when you can use the built in delete (del) command? If it's a really old program, perhaps that is why you are having problems with it?
DeleteXP was a program I used to provide a smaller example. I am having the same problem with Calibre eBook, a much bigger application (so not as easy to debug and trace) and this is really where my problem is. I had this problem with other apps before but upon upgrading to a "Windows 7 & 8 certified" version, the issue went away ... so I suspect a ill-use of an older programmatic API Calibre may be using. Regardless of my speculations, if anyone has an idea of what may cause this, I am game for listening ... I have seen people having similar problems on Windows 7 (with no real resolve so far).

Thank you.
My System SpecsSystem Spec
04 Aug 2013   #25
x BlueRobot

 

I've never used Process Explorer with traces, but the slow thread creation, may be due to the query and not find the correct key:

Code:
08:27:22.3205980 DeleteXP.exe 7196 RegQueryValue HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoPropertiesMyComputer NAME NOT FOUND Length: 144
My guessing the program is looking for this key, and then not finding it, but since the program still runs without error, the thread creation is just delayed. The thread delay will specific to that program from what I understand.

I've never written or used the Windows Shell API, so I wouldn't be able to properly comment on SHFileOperation() function call, but since the API has been changed from Windows Vista to the IFileOperation interface to provide tighter control to certain functions. I don't think is will be any performance difference between the two, just better control.

I'll check if that key exists, and also I'm wondering about the compatibility between the two programs with Windows 7?
My System SpecsSystem Spec
04 Aug 2013   #26
jlauret7

Windows 7 Professional
 
 

Quote   Quote: Originally Posted by x BlueRobot View Post
I've never used Process Explorer with traces, but the slow thread creation, may be due to the query and not find the correct key:

[...]

I'll check if that key exists, and also I'm wondering about the compatibility between the two programs with Windows 7?
Thanks Blue for checking.
The problem occurs as well with Calibre (I used DeleteXP as a double check of a rpogram I am sure is using the older API for delete operations). The Calibre trace is below

16:26:10.2614514 calibre.exe 8276 RegOpenKey HKCR\Wow6432Node\CLSID\{3EEF301F-B596-4C0B-BD92-013BEAFCE793}\InprocHandler32 NAME NOT FOUND Desired Access: Query Value
16:26:10.2614999 calibre.exe 8276 RegQueryKey HKCR\Wow6432Node\CLSID\{3EEF301F-B596-4C0B-BD92-013BEAFCE793} SUCCESS Query: Name
16:26:10.2615399 calibre.exe 8276 RegQueryKey HKCR\Wow6432Node\CLSID\{3EEF301F-B596-4C0B-BD92-013BEAFCE793} SUCCESS Query: HandleTags, HandleTags: 0x401
16:26:10.2616092 calibre.exe 8276 RegOpenKey HKCU\Software\Classes\Wow6432Node\CLSID\{3EEF301F-B596-4C0B-BD92-013BEAFCE793}\InprocHandler NAME NOT FOUND Desired Access: Query Value
16:26:10.2616604 calibre.exe 8276 RegQueryKey HKCR\Wow6432Node\CLSID\{3EEF301F-B596-4C0B-BD92-013BEAFCE793} SUCCESS Query: HandleTags, HandleTags: 0x401
16:26:10.2617039 calibre.exe 8276 RegOpenKey HKCR\Wow6432Node\CLSID\{3EEF301F-B596-4C0B-BD92-013BEAFCE793}\InprocHandler NAME NOT FOUND Desired Access: Query Value
16:26:10.2617401 calibre.exe 8276 RegCloseKey HKCR\Wow6432Node\CLSID\{3EEF301F-B596-4C0B-BD92-013BEAFCE793} SUCCESS
16:26:37.5307264 calibre.exe 8276 Thread Exit SUCCESS Thread ID: 8528, User Time: 0.0000000, Kernel Time: 0.0000000
16:26:37.5316260 calibre.exe 8276 Thread Exit SUCCESS Thread ID: 1356, User Time: 0.0000000, Kernel Time: 0.0000000
16:26:40.2627325 calibre.exe 8276 Thread Create SUCCESS Thread ID: 1088
16:26:41.9062775 calibre.exe 8276 ReadFile C:\Windows\SysWOW64\shell32.dll SUCCESS Offset: 25,600, Length: 8,192, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O, Priority: Normal
16:26:41.9176179 calibre.exe 8276 RegQueryKey HKLM SUCCESS Query: HandleTags, HandleTags: 0x0
16:26:41.9176621 calibre.exe 8276 RegOpenKey HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\Explorer REPARSE Desired Access: Query Value
16:26:41.9177010 calibre.exe 8276 RegOpenKey HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer SUCCESS Desired Access: Query Value
16:26:41.9177264 calibre.exe 8276 RegSetInfoKey HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer SUCCESS KeySetInformationClass: KeySetHandleTagsInformation, Length: 0
16:26:41.9177488 calibre.exe 8276 RegQueryValue HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoPropertiesMyComputer NAME NOT FOUND Length: 144
16:26:41.9177676 calibre.exe 8276 RegCloseKey HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer SUCCESS
16:26:41.9177876 calibre.exe 8276 RegQueryKey HKCU SUCCESS Query: HandleTags, HandleTags: 0x0

Observe carefully - from

16:26:10.2617401 calibre.exe 8276 RegCloseKey HKCR\Wow6432Node\CLSID\{3EEF301F-B596-4C0B-BD92-013BEAFCE793} SUCCESS

to the first thread exit

16:26:37.5307264 calibre.exe 8276 Thread Exit SUCCESS Thread ID: 8528, User Time: 0.0000000, Kernel Time: 0.0000000

a good 27 seconds were spent ... another few seconds for creating anew thread

16:26:40.2627325 calibre.exe 8276 Thread Create SUCCESS Thread ID: 1088

Then later, I have some delays again

16:26:44.1889100 calibre.exe 8276 RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume\{dedcd2e7-981a-11e0-b941-ec55f9cb2dff} SUCCESS
16:26:44.1889570 calibre.exe 8276 RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume\{dedcd2e2-981a-11e0-b941-ec55f9cb2dff} SUCCESS
16:27:13.5419709 calibre.exe 8276 RegQueryKey HKCU SUCCESS Query: HandleTags, HandleTags: 0x0
16:27:13.5420236 calibre.exe 8276 RegOpenKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC\Volume SUCCESS Desired Access: Read
16:27:13.5420648 calibre.exe 8276 RegSetInfoKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC\Volume SUCCESS KeySetInformationClass: KeySetHandleTagsInformation, Length: 0
16:27:13.5421380 calibre.exe 8276 RegQueryKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC\Volume SUCCESS Query: HandleTags, HandleTags: 0x400
16:27:13.5421865 calibre.exe 8276 RegOpenKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\CPC\Volume\{3ce4156a-c100-11e0-b3ff-806e6f6e6963}\ SUCCESS Desired Access: Read


here goes another 30 seconds and finally at


16:27:13.5470962 calibre.exe 8276 QueryDirectory C:\Users\xxx\Documents\Calibre Library\Mark Twain SUCCESS Filter: Mark Twain, 1: Mark Twain

Mark Twain is removed. It spent quite a bit just for one book (then resumes to rebuild the index).

The total operation is a good minute in this case to remove/delete one book from the library.
I know for a fact that Kovid uses SHFileOperation() rather than IFileOperation() and have seen threads (SHFileOperation very slow when many files in folder - Software Development for Windows Vista - Windows Tech, c++ - Using SHFileOperation: What errors are occuring - Stack Overflow, etc ...) where that function is questioned.


I am dreaming of the day that I can solve this problem ... I hope you will have a good idea.

Many thanks for looking into it.
My System SpecsSystem Spec
04 Aug 2013   #27
x BlueRobot

 

Another thing too, the same error:

Code:
16:26:41.9177488 calibre.exe 8276 RegQueryValue HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoPropertiesMyComputer NAME NOT FOUND Length: 144
SHFileOperation() seems to be the problem, it gives reason for Microsoft to change the API and recommend using the IFileOperation.

More threads related to very slow performance:
My System SpecsSystem Spec
04 Aug 2013   #28
jlauret7

Windows 7 Professional
 
 

Quote   Quote: Originally Posted by x BlueRobot View Post
Another thing too, the same error:

Code:
16:26:41.9177488 calibre.exe 8276 RegQueryValue HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoPropertiesMyComputer NAME NOT FOUND Length: 144

SHFileOperation()
seems to be the problem, it gives reason for Microsoft to change the API and recommend using the IFileOperation.

More threads related to very slow performance:

Two questions:

- Should I try to create Explorer\NoPropertiesMyComputer and if so, what is its type?

- We are converging on SHFileOperation() is sometimes (for a few "victims") painfully slow and unworkable + this has been known and Microsoft recommended the use of IFileOperation. Can we demonstrate this? If so, perhaps the authors of Calibre would be willing to re-code ...
My System SpecsSystem Spec
04 Aug 2013   #29
UsernameIssues

W7 Pro SP1 64bit
 
 

I've spent a fair amount of time with Process Monitor and these types of things come up a lot. They sure look like an error, but lots of operations that are native to Windows will cause entries like this. It should not cause a process to hang - but since your computer is doing something that is not normal, we can go a little ways down this road:

The registry entry is a local police setting. (See here and here.) If that policy has never been set, then the registry key may be absent. It is absent on a fresh install of W7 pro. You can create the key of Explorer and then the DWORD of NoPropertiesMyComputer if you want.

You should leave the value at 0:

Slow deletion of files-nopropertiesmycomputer.png


Setting it to a value of 1 (and then restarting the computer) should remove the Properties entry from the context menu of Computer:

Slow deletion of files-properties.png


Have you had a chance to try a clean boot?


My System SpecsSystem Spec
05 Aug 2013   #30
jlauret7

Windows 7 Professional
 
 

Quote   Quote: Originally Posted by UsernameIssues View Post
I've spent a fair amount of time with Process Monitor and these types of things come up a lot. They sure look like an error, but lots of operations that are native to Windows will cause entries like this. It should not cause a process to hang - but since your computer is doing something that is not normal, we can go a little ways down this road:
Yes, agreed - I have seen a ot of those operations (and wondered why they are done at all) with Windows (check a directory exists, check a reg key is set, etc ... eventually leading to a not found). Never saw this as a problem and assume this is Windows way to check if options exists or not.

Quote   Quote: Originally Posted by UsernameIssues View Post
The registry entry is a local police setting. (See here and here.) If that policy has never been set, then the registry key may be absent. It is absent on a fresh install of W7 pro. You can create the key of Explorer and then the DWORD of NoPropertiesMyComputer if you want.

You should leave the value at 0:

[...]
So, I did set this value and tried (both DeleteXP and Calibre) with no changes whatsoever. With that observation and the previous ones (kind of normal operations to check REG keys), I think we should abandon the idea that those missing REG keys have any effect.




Quote   Quote: Originally Posted by UsernameIssues View Post
Have you had a chance to try a clean boot?
I have and there were no change either
To make sure, tried also both my initial issue (Calibre) and the smaller self-contained program also hanging as a test (DeleteXP). The delays are as usual (20 to 40 seconds per file).

If one look at the post follow-up from Blue and the few I posted, the problem of "slow file deletion" has been observed by other people in other context (btw, I cannot access his first link but it is the same as How can I recycle w/o using SHFileOperation (which is painfully slow)?).
My System SpecsSystem Spec
Reply

 Slow deletion of files




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Shift+Delete problems and reappearing files after deletion
Hello, I have had a good clean copy of Windows 7 installed for some time now and right from the start I noticed a problem that until recently, I managed to tolerate. Whenever I shift+delete a file that is an executable, batch file or similar, it returns temporarily then dissapears on it's own...
General Discussion
Best (free!) recovery software to use after deletion of files
Hello everyone, it's me again! I need some assistance, after a mate of my e-mailed me as has deleted some files by mistake, and was wondering how to get them back (If possible?) I do wish people would stop pestering me, due to my slightly better than average knowledge of PCs! Here's his e-mail:...
Backup and Restore
Creating a Files log deletion
I see there is no log in windows 7 about the deleted files I often use the shift + delete to delete files I do not need, unfortunately sometimes the parent folder gets deleted instead (focus on the left tree area instead of the right list area) at least, a list of the deleted files would be...
General Discussion
Restore files after accedental partiition deletion
Heres the deal: 2 drives: 1TB WD where all my files are 120 OCZ SSD were I load my O/S from I was quickly going thru the motions of installing windows and got to the part about where I wanted it. I deleted the entire partition table in both of my drives. Quickly realizing what I did, I...
Backup and Restore
How do I restore the .exe files deletion warning popup in Win7 ?
When you delete an .exe file, Win7 opens a popup warning and it's got a selection box to "don't ask again for all files of this type" (or something like that). I left unintentionaly the selection on, and as a result the popup warning is not opening, and .exe files are deleted in just one step. ...
General Discussion
Accidental deletion of sent files Outlook 07
Any chance of recovery of the sent file folder which was accidentally deleted. Outlook 2007 :( Actually just the files in the sent folder, not the folder itself.
Microsoft Office


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 11:41.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App