Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Sun Feb 15 12:25:58 CET 2004

On Sat, 14 Feb 2004, Matt Emson wrote:

> > I fixed this. The problem was that the behaviour of Borland's TList
> changed
> > - it got (a lot!) slower. In older TList implementations TList.Clear
> didn't
> > do anything except free the memory for the list elements.
> > Now it calls Notification for all elements in the list, which is a time
> > consuming task.
> Yes, but this is actually cool though because you can get event based
> notifications when any element is removed. That's why they did it.

I understand their reasons, but it's not so cool if you don't care about 
this event and have a list of 10000 elements. It's a serious performance
penalty in such case. It would have been better if this behaviour had been
optional (remember, it appeared only in later Delphi versions). As soon 
as I figure out how, I will change the FPC implementation so this doesn't 
happen unless really needed.


More information about the fpc-pascal mailing list