Modify

#820 closed Feature Request (Completed)

Speed enhancement to _FileListToArray

Reported by: Spiff59 Owned by: Gary
Milestone: Future Release Component: Standard UDFs
Version: Severity: None
Keywords: Cc:

Description

_FileListToArray is an often-used and time-consuming function.
Almost the entire processing time of the function is spent within a FileFindNextFile loop. Within the existing loop are two seperate compares testing the value of a passed parameter.

I propose inserting a Switch statement, which will drive three seperate While loops. This allows the removal of the two tests from the exisitng While loop.

The fucntionality of the routine remains identical, but adding one Switch statements prohibits the execution of potentially tens of thousands of unnecessary compares. The attached _FileListToArray consistantly ran about 13% faster on my machine, regardless of the size of the returned array.

Attachments (1)

FLTA.au3 (1.8 KB ) - added by Spiff59 on Feb 15, 2009 at 5:35:26 PM.
_FIleListToArray (new version)

Download all attachments as: .zip

Change History (4)

by Spiff59, on Feb 15, 2009 at 5:35:26 PM

Attachment: FLTA.au3 added

_FIleListToArray (new version)

comment:1 by TicketCleanup, on Feb 15, 2009 at 6:00:01 PM

Version: 3.3.0.0

Automatic ticket cleanup.

comment:2 by Jpm, on Feb 25, 2009 at 9:53:07 AM

Resolution: Completed
Status: newclosed

#837 brought a division by 3

comment:3 by TicketCleanup, on Feb 25, 2009 at 12:00:02 PM

Milestone: Future Release

Automatic ticket cleanup.

Modify Ticket

Action
as closed The owner will remain Gary.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.