Slow startup fix caused by floppy

Discuss development issues and submit patches here
Post Reply
twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Slow startup fix caused by floppy

Post by twinsen »

There is a considerable delay when I run Explorer++ or open a "My Computer" new tab.
It queries state of the floppy drive and it makes a loud sound and takes a few seconds.
I've now stopped it querying the A:\ and its as fast as windows explorer now.

* Src: Explorer++_floppy_fix_changed_files.zip http://members.iinet.net.au/~bertdb/rya ... _files.zip

You can diff the files with 1.2 to see the changes.
Revision 156 patch is attached in a post below.
Last edited by twinsen on Sun Jan 02, 2011 5:15 pm, edited 1 time in total.
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Slow startup fix caused by floppy

Post by ajs »

Hi twinsen,
I have merged your changes for this as well.
I also added the check for the B:\ drive (not only A:\).
I will post a new patch later today, after I merge more of your changes.
Since I have no floppies, please test the new code after I post the patch.
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Slow startup fix caused by floppy

Post by ajs »

David Erceg
Site Admin
Posts: 933
Joined: Sat Apr 18, 2009 1:46 am

Re: Slow startup fix caused by floppy

Post by David Erceg »

Sorry, but I won't be merging this patch in as it stands. I can't say about Windows XP, but it appears A:\ and B:\ can be mapped to any drive on Vista and later (provided there are no floppy drives connected). From doing some brief research, it also looks like there's no reliable way to detect whether a drive is a floppy drive or not.

A better approach would be for the treeview to only monitor drives which have been expanded and for the column manager to gather all information in a background thread.
twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Re: Slow startup fix caused by floppy

Post by twinsen »

There is another way, just don't call those functions if the type is "3 1/2-Inch Floppy Disk".
For some reason getting the type does not induce the few second delay and does not cause the floppy drive to make noise and light to come on.
twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Re: Slow startup fix caused by floppy

Post by twinsen »

* Changed it to use drive type instead of A: and B:
* Supports suppression of both "3½-Inch Floppy Disk" and "5¼-Inch Floppy Disk" drives.
* Supports both Windows XP and Windows 7.
Revision 156 patch attached (7/March/2011).
Attachments
FloppyFix_v156.1_win7_fix.7z
(939 Bytes) Downloaded 579 times
Last edited by twinsen on Mon Mar 07, 2011 7:08 pm, edited 4 times in total.
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Slow startup fix caused by floppy

Post by ajs »

Hi David,
I have merged the last change from twinsen which uses the drive type instead of the drive name.
I have also applied the same change to the code for showing the name of drives on the drives toolbar: for floppy drives we do not display the name.

Twinsen, I slightly changed your code: I made the comparison case-insensitive and got rid of the wstring, using olny tchar strings. since I don't have a floppy to test it, can you give it a try to make sure it is ok?

patch against commit 156 and including all previous ones.
Attachments
patch_10__v156.7z
(39.33 KiB) Downloaded 621 times
twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Re: Slow startup fix caused by floppy

Post by twinsen »

Yep works perfect.

I'm just used to using std::strings/wstrings and std:*stringstream for my string manipulation (and using vectors instead of arrays).
Your code is shorter, because it doesn't copy to a wstring, so its better.
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Slow startup fix caused by floppy

Post by ajs »

twinsen wrote:Yep works perfect.

I'm just used to using std::strings/wstrings and std:*stringstream for my string manipulation (and using vectors instead of arrays).
Your code is shorter, because it doesn't copy to a wstring, so its better.
I just try to follow David's style, so where possible I try to use Window's functions instead of C++'s ones
twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Re: Slow startup fix caused by floppy

Post by twinsen »

I updated the patch to support windows 7.
If you need an exe (eg you don't have VS2010 to apply the patch), this one wont have that annoying startup floppy delay:
http://members.iinet.net.au/~bertdb/rya ... sen_2.2.7z
Post Reply