[Lazarus] FileUtil.FindAllFiles - changes strings inside

Ralf Quint freedos.la at gmail.com
Mon Sep 21 20:55:19 CEST 2020


On 9/21/2020 3:16 AM, Bart via lazarus wrote:
> On Mon, Sep 21, 2020 at 12:19 AM AlexeyT via lazarus
> <lazarus at lists.lazarus-ide.org> wrote:
>
>> you see that to iterate over all items in char-separated ASearchPath,
>> code modifies str, ie deletes parts of it. It's slow! We should not
>> modify str here. It's easy- save old-index, new-index, and get Copy(n1,
>> n2-n1{+delta}).
> Premature optimization.
> File IO is orders of magnitude slower that iteration over a string.

+1



-- 
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the lazarus mailing list