• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

File System Optimization

I'm looking for suggestions on optimizing our application to list directories faster.  Right now, it takes about a minute + to load the directories on a shared network drive.

Does anyone have any suggestions on how to break this out?  Generate the file structure in a database and use the database to traverse the file structure?  Break down actually directories into more sub-directories?

Thanks,

Eric
0
eromanowski
Asked:
eromanowski
  • 3
  • 2
1 Solution
 
giltjrCommented:
How many directories?

Are you walking down the full tree in one shot?
0
 
eromanowskiAuthor Commented:
We have 78,000 directories.  The application (written in vb6) uses an embedded Windows Explorer.
0
 
giltjrCommented:
Well if you are attempting to walk all 78,000 at one time you are really lucky that it only takes about a minute to.

The only way to make it work faster is to move the files to the server doing the work, either physically on the box or if they are on a SAN, get the server connected to the SAN.

Doing this over the network will be murder, as you have found out.
0
 
eromanowskiAuthor Commented:
One idea I had was to load all the directories into a database (via a script).  We then could simulate folder browser until they actually drill down a file or folder within the structure.  Would need some way to keep the database in sync with the file system.
0
 
giltjrCommented:
You could do that, but the question is how often are you going to sync the file system with the DB?  Since I don't know why you need to do this, I don't know what affect it would have if you were an hour out of sync, which could be a few hundred files, or a file or two.  Only you can answer that.

Is it totally out of the question to move the files to the server?

Now the one advantage of putting listing in a DB, is that you could have the program that gets the directory run on the same server that the files actually reside on and have it remotely update the database.

You also need to decide how you are going to update the DB.  Try and find the differences between the last run and this run and apply the changes (adds, deletes, modifieds) or just wipe all entries and re-add everything from scratch.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now