Re: GetDirectories Performance

Tech-Archive recommends: Speed Up your PC by fixing your registry



"Tom Scales" <tjscales@xxxxxxxxx> schrieb:
I'm writing a VB.NET 2003 program that uses a Treeview to display the drive
structure on the computer. I am having a major problem with performance.
The are many files on one drive (over a million) and it is killing me. For
example, one directory has a structure:

Instead of populating the whole treeview control on startup, only add the nodes on the first level and check if the folders contain subfolders. If the latter is the case, add a dummy subnode to the node representing the folder. Then catch the node expand event and replace the dummy node with nodes for the actual files and folders contained in the folder. This should lead to acceptable performance and memory usage would be much lower than populating the whole control. In addition, in many cases it's very unlikely that the user will expand every single node and thus much less memory will be occupied by your application in total.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

.



Relevant Pages

  • Re: GetDirectories Performance
    ... the nodes on the first level and check if the folders contain ... If the latter is the case, add a dummy subnode to the node ... Then catch the node expand event and replace ... This should lead to acceptable performance and memory usage ...
    (microsoft.public.dotnet.languages.vb)
  • Re: GetDirectories Performance
    ... nodes on the first level and check if the folders contain subfolders. ... add a dummy subnode to the node representing the ... Then catch the node expand event and replace the dummy node with ... should lead to acceptable performance and memory usage would be much ...
    (microsoft.public.dotnet.languages.vb)
  • Re: GetDirectories Performance
    ... nodes on the first level and check if the folders contain subfolders. ... add a dummy subnode to the node representing the ... Then catch the node expand event and replace the dummy node with ... should lead to acceptable performance and memory usage would be much lower ...
    (microsoft.public.dotnet.languages.vb)
  • Re: HELP - Explorer.exe 99% CPU Usage
    ... > when I go to my directories it goes crazy 99% ... > after 10-20sec the system has a crash and all the folders close ... > I have the latest viruse update - and I don't think it is a virus ... > Also the memory usage is always below 300MB ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: HELP - Explorer.exe 99% CPU Usage
    ... Mlody wrote: ... > when I go to my directories it goes crazy 99% ... > after 10-20sec the system has a crash and all the folders close ... > Also the memory usage is always below 300MB ...
    (microsoft.public.windowsxp.perform_maintain)