Thread: UI Installer
View Single Post
  #46  
Unread 03-22-2005, 12:47 AM
ger's Avatar
ger ger is offline
Steward of the Faithful
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 580
Default

Quote:
Originally Posted by Dolby
It displays the folders then after about 1min the uiinstaller window goes white.
Yeah, it will do that occassionally. Unfortunately, it has to do with how fast UIInstaller scans directories, how many directories it's scanning at any given time, and how fast Windows/.NET can update a window.

I'll try to give a brief rundown of how the find function works so this makes more sense. Find starts with a list of every possible drive and scans to see which ones exist. Once it knows which drives exist it starts at the beginning of the alphabet and scans each drive one at a time. Now, this is where things get wacky. When scanning the individual directories it will look for EQ2.exe and if it finds it add the location to an array. Regardless of whether or not it finds it it will then launch a scan on every subdirectory in the directory it's looking in. It will continue doing that until it runs out of directories to look in, but that means that when you get to directories with a lot of subdirectories (basically, any Microsoft product) you end up with a lot of scans going on at once. While each scan in and of itself only takes a fraction of a second (think typing "dir EQ2.exe" on the command-line) having a couple hundred running at the same time can overload the refresh function.

Each directory that's scanned triggers not only the scan itself, but also a change of the status bar text box, and then an update of the status bar text box. Without forcing an update you wouldn't see any change in the status bar until the scan was complete, and by that time what's the point? So, combine looking through a couple hundred directories at the same time, with trying to change and redisplay a text box a couple hundred times in the same instant, and you end up with a white program window. But the program isn't locked or crashed at this point. It's still scanning and once it reaches the last subdirectory in the string it's working on it'll refresh the display.

The thing that has me wondering is why is it taking a full minute to scan your machine? On mine I routinely scan an 80GB primary HDD, 160GB secondary HDD (USB), a DVD-ROM, and an emulated DVD-ROM, and it never takes nearly that long, even if it does flip out and go white briefly.
__________________
Reply With Quote