Page 1 of 1

How is memory affected depending on how instantitate teechart?

Posted: Fri Feb 23, 2024 1:33 pm
by 16592373
I have a lot of datafeed of stockprices that should be visualised with different charttypes (selected by me).

What aspects in place about the programdesign and memoryusage.

1. is it memoryexpensive to locate many tchart components, if I have many forms for different usage or
2. Should I try to centralise everything to one form?

Can you elaborate a little about different concerns?

thanks

Re: How is memory affected depending on how instantitate teechart?

Posted: Mon Feb 26, 2024 4:49 am
by 30297515
Hey Senbengtma,

Hey posting is the only way I can reach out, quick question where are you getting all your stock info?

Thanks

Re: How is memory affected depending on how instantitate teechart?

Posted: Mon Feb 26, 2024 7:06 am
by yeray
Hello,

The TChart component is like any other component. It's basically a set of properties and methods, hundreds of them.
I wouldn't say TChart is memory expensive at all, specially given all the possibilities it offers. Instead, I'd say a TChart can be memory expensive depending in the data it contains.
If the amount of data to be shown in those Charts is small, you are probably good to go with keeping those charts in memory.
However, if the data to be shown in those Charts is big, then you'll probably need to destroy and recreate the charts as the user hides/shows them.
I'd do some tests trying to replicate the use case to see the real impact and take the decision based on my own experience.

Re: How is memory affected depending on how instantitate teechart?

Posted: Mon Feb 26, 2024 7:07 am
by yeray
Hello,
McSaverCharting wrote:
Mon Feb 26, 2024 4:49 am
where are you getting all your stock info?
I'm sorry but I don't understand what stock info do you mean?