ZTree.com  | ZEN  | About...  

 Index   Back

[Q] Skip Log [Up Arrow] Volumes?   [Q]

By: Ben Kent       
Date: May 10,2022 at 20:55
In Response to: [Q] Skip Log [Up Arrow] Volumes? (Dan LeGate)

> > Dan
> >
> > Did you try the various commands to see how they behave on the
> systems
>
> Hi Ben!
>
> I ran Get-WMIObject -Class Win32_LogicalDisk
>
> twice in a row. Both times, very slow.
>
> The second command, (Get-PSDrive -PSProvider FileSystem) also slow.
>
> 3rd command [System.IO.DriveInfo]::getdrives() was faster, but the
> culprit drive was again very slow.
>
> The two wmic commands ran very fast, and didn't list the slow drive.
>
> The newer commands you sent, the first one:
>
> Get-WMIObject -Query 'select DeviceID,DriveType from
> Win32_LogicalDisk'
>
> ran VERY fast. The second one:
>
> Get-WMIObject -Query 'select
> DeviceID,DriveType,ProviderName,FreeSpace,Size from Win32_LogicalDisk'
>
> just as slow as before.
>
> I've noticed the initial connection is much slower. If I do a * log of
> the slow drive, before it starts it's very slow, but it goes faster
> between directories, but it's still not what I would call "fast". But
> there's no pause between directories as it continues to traverse.
>
> Dan

Dan

So given those results WMI only reads the data that is requested, and it's probably the FreeSpace and/or Size that are slow.

Is this quick or slow? The answer would change how you request the ZEP.
Get-WMIObject -Query 'select DeviceID,DriveType,ProviderName from Win32_LogicalDisk'



The simple ZEP
A new configuration option for "Log, Volumes info" = Full, Short, Possibly others
With Full being the default and short only showing the drive letter and drive type, and assuming ProviderName does slow things down the UNC path.


The complex ZEP
If ZTree uses WMI to read the information and the API that is used has a command timeout parameter, then ZEP for ZTree to do a two pass process,
pass one: get the DeviceID,DriveType and possibly ProviderName,
pass two: one drive at a time with the timer set, get the extra information


The other way, change your behaviour
As stated before you could stop using Log, Volumes (up), and switch to a fast external to ZTree command to get the drives list, which you could run from eXecute of F9. Then do Log, drive letter


As for why the drives are slow, you don't give enough information, there could be all sorts of reasons: USB 1 attached, hardware issues, hierarchical storage, SAN over a long link, something like a OneDrive mapped drive, ...

Ben

77 views      
 

Messages in this Thread

 
95,921 Postings in 12,112 Threads, 350 registered users, 41 users online (1 registered, 40 guests)
Index | Admin contact |   Forum Time: Jul 4, 2022 - 3:41 pm UTC  |  Hits:48,989,284  (19,846 Today )
RSS Feed