WDef
Group: Members
Posts: 798
Joined: Sep. 2005 |
|
Posted: July 18 2007,17:17 |
|
Quote | Listing tar contents can take a noticeable amount of time, |
The loop terminates as soon as a system dir is struck - since it's a pipe tar then stops listing files, so for "red" extensions it's quite fast. And, once mkwriteable has been called, it shouldn't get run at all.
The whole list will however get read for "green" extensions (a minority) if no red extensions have been loaded. I don't have any really big .tar.gz extensions, but on the 860K john-1.7.0.2.tar.gz it runs in 0.072s. On slow processors, maybe 10-15 times that delay is still tolerable.
As a backwards compatibility measure to get rid of the minority tar.gz's, I think it's probably wearable - people can wait a bit longer for the occassional large .tar.gz's to load?
If it proves to be a problem, another alternative might be to put an empty file in extensions for the sole purpose of flagging (for eg) that they are green and mkwriteable shouldn't be run, or to invent a new extension suffix, but I don't like either idea.
|