[Bug 3817] InstallShield very slow when copying many small files
wine-bugs at winehq.org
Mon Mar 12 03:11:56 CDT 2007
------- Additional Comments From scott at open-vote.org 2007-12-03 03:11 -------
It shouldn't be that complicated.
Get a list of every file in a directory, and then determine the distance on the
character table between lower case and upper case.
Write a comparison function, it theoretically should just be twice as slow as
finding a case insensitive string in a list of case insensitive strings.
If the function is building a list of every possible filename outcomes for each
file before checking against it, _THAT_ is a waste of CPU cycles and will work
slow as hell. It should just be done realtime...I haven't looked at the code yet.
The method I described would be fast, any modern PC could do it hundreds of
thousands of times a second.
So, it's a matter of...lets say we have a directory
HeLlO.txt(at least in *nix FS)
We're looking for case insensitive hell.txt
so we iterate through the list looking for H and h, for each match, take the
next letter of hell, compare against e and E. It's just a couple embedded loops,
and it would be pleanty fast. Do it for the last two letters of hell. Don't
apply this algorithm to the list of files preemptively, apply it to the file
we're looking for on the fly, in an embedded loop that would only have to scan
the list once.
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs