Modify

Opened 16 years ago

Closed 16 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 16 years ago.
FLTA beta versus modified-beta test demo

Download all attachments as: .zip

Change History (6)

Changed 16 years ago by spiff59

FLTA beta versus modified-beta test demo

comment:1 Changed 16 years ago by anonymous

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

comment:2 follow-up: Changed 16 years ago by Valik

  • Type changed from Bug to Feature 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 Changed 16 years ago by TicketCleanup

  • Version 3.3.0.0 deleted

Automatic ticket cleanup.

comment:4 in reply to: ↑ 2 Changed 16 years ago by anonymous

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 Changed 16 years ago by Valik

  • Resolution set to Rejected
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.