Modify

Opened 17 years ago

Closed 17 years ago

#973 closed Feature Request (Rejected)

_FileListToArray()

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

A substantial speed increase has been realized by the change to FileFindNextFile and _FileListToArray per the changes in Bug Trac #837. _FileListToArray is an often-used and time-consuming function. The following example, in my testing, adds another notable increae in speed by using separate While loops for each value of the $iFlag parameter and thereby eliminating 1-4 comparisons per file name returned. The StringRegExp replacing the multiple-OR comparison statement also gains a few more tics and reads nicer.

Pardon me if attaching this as a test demo with both the beta and modified-beta versions included is improper.
Thank you.

Attachments (1)

FLTA.au3 (3.6 KB ) - added by spiff59 17 years ago.
FLTA beta versus modified-beta test demo

Download all attachments as: .zip

Change History (6)

by spiff59, 17 years ago

Attachment: FLTA.au3 added

FLTA beta versus modified-beta test demo

comment:1 by anonymous, 17 years ago

Grr.. I missed the drop-down to make this a feature request, rather than a bug report. My apology.

comment:2 by Valik, 17 years ago

Type: BugFeature Request

I don't know about this. There's a balance between performance and maintainable code and I think this crosses the line. This same type of optimization can be made for lots of functions.

comment:3 by TicketCleanup, 17 years ago

Version: 3.3.0.0

Automatic ticket cleanup.

in reply to:  2 comment:4 by anonymous, 17 years ago

Replying to Valik:

I don't know about this. There's a balance between performance and maintainable code and I think this crosses the line. This same type of optimization can be made for lots of functions.

I had also considered the balance of additional code versus the performance benefit. I'd thought that since this function is widely-used and the loop can potentially be executed 1000's of times, that the speed increase was worth an extra 20 lines of code. I just wanted to toss the idea out there, with good intentions, and I will certainly be content with whatever conclusion is reached. Thanks for your time.

comment:5 by Valik, 17 years ago

Resolution: Rejected
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


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