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)
Change History (6)
by , 17 years ago
comment:1 by , 17 years ago
Grr.. I missed the drop-down to make this a feature request, rather than a bug report. My apology.
follow-up: 4 comment:2 by , 17 years ago
| Type: | Bug → 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:4 by , 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 , 17 years ago
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |

FLTA beta versus modified-beta test demo