Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Jul : Indy performance
| Subject: | Indy performance |
| Posted by: | "Gabriel Corneanu" (gabrielcorneanu@nospam.yahoo.com) |
| Date: | Mon, 25 Jul 2005 20:09:16 |
I started to use lately Indy and I looked at the internals.
I found several places where the string processing is not very optimized.
Most of the time the string parameters are not passed as const (where
possible); this is not really a problem because the strings are reference
counted, but still...
Where I'm not so happy is when searching for strings;
- in commandhandlers, this construction is used:
TextIsSame(Copy(AData, 1, Length(Command)), Command);
this should really be
StartStr(Command, AData)
to avoid an extra copy
- I also found a lot of constructions like "if IndyPos(...) = 1", which has
exactly the same meaning.
Isn't anyone interested in performance? I understand that most of the time
there is no real performance gain, but why shouldn't we do it the right way?
Regards,
Gabriel