Support Board
Date/Time: Mon, 10 Mar 2025 20:10:35 +0000
Understanding Study/Price overlay memory usage
View Count: 580
[2022-04-04 19:32:05] |
jwick - Posts: 142 |
Hi ... I'm using a lot of study / price overlay studies in my chartbook (a total of 15 spread 5 each across 3 charts). The study being referenced sets values in a lot of subgraphs (42), in case that is relevant. I'm finding the study / price overlay studies use a lot of memory. When I load the chart, they're using an additional 4 GB of memory in total (if I remove all of the study / price overlay instances, my memory usage immediately drops around 4 GB). And if I run a chart replay across all my charts, the difference in memory usage jumps to a whopping 16GB (without the study / price overlay studies, the usage after a chart replay ends roughly where it began when I loaded the chartbook - 6 GB. However, with the study / price overlay studies, the usage jumps to 20GB at the end of a chart replay). Why would this happen? Is it expected behavior for the study / price overlay study to be memory intensive? The only studies applied in the chartbook are the study / price overlay studies and my custom study in the source chart that they reference. Thanks! EDIT: Additional query ... if this is expected behavior of Study / Price overlay, would using sc.GetChartBaseData() instead of Study / Price Overlay be any more memory efficient? Date Time Of Last Edit: 2022-04-04 20:04:42
|
[2022-04-04 22:45:27] |
|
From our perspective this does not make any sense at all. This is a study like any other study. It should not use any more memory than necessary based upon the number of Subgraphs in the source study. We do not know what is going on in your case. When we hear of extreme memory use like this, we have to ask you why is that happening? We do not know. You also have to realize, that the Windows Task Manager is most definitely not an accurate representation of memory use at all by the process. It will show more memory being used than actual. Please understand we cannot get involved in these kinds of discussions. Our time is very valuable and we do not want to get involved in discussions of what you are doing with Sierra Chart, and how the operating system is managing and reporting memory. We simply cannot help with these things. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2022-04-04 22:47:48
|
[2022-04-05 01:35:05] |
jwick - Posts: 142 |
Fair enough ... could I get some insights into my second question in that case? Currently I'm using the study / price overlay to reference the source charts ... and then in my destination chart, I use GetStudyArrayUsingID (referencing the study / price overlay study) to read in and use the referenced data. Would there by any benefit in using GetChartBaseData() directly instead of the roundabout way I am currently referencing data through the study / price study? Or will it just perform the same (which is what I suspect) since I'm assuming the study / price overlay study simply uses getchartbasedata() itself? |
[2022-04-05 10:49:51] |
|
There may be a benefit to using GetChartBaseData() directly if you are able to precisely accomplish what you need and that works well for you. This will be a decision you will have to make. The Study/Price Overlay study simply references the Subgraph arrays of the study it is referencing in another chart. And it uses identical number of arrays as the source study. There is nothing unusual about it regarding memory use. It is like any other study. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2022-04-05 10:50:09
|
[2022-04-05 16:51:25] |
jwick - Posts: 142 |
Gotcha thanks ... I'll re-work my code and see if that makes a difference. Also, two more questions, if I may ... 1) when using SCGraphData / calling GetStudyArraysFromChartUsingID(), is a copy of the data from the source chart made into the SCGraphData object or internally are pointers set to the data in the source chart and so no additional memory is used (other than for the pointers themselves)? 2) And a related question, is memory for a subgraph allocated only the first time it is used? So, all else equal, a study that only sets a value in Subgraphs[0] will use less memory than a subgraph that sets values within Subgraphs[0] till [20], for example? I ask this because the study I have in those destination charts (which currently make use of 42 subgraphs (and several Arrays within those subgraphs)) does use quite a bit of memory (in fact removing those studies seems to reduce memory consumption by nearly an equal amount as removing the study / price overlay studies pointing to the custom study). The custom study uses no persistent pointers (or any new memory allocations within) so my internal world of how things works makes sense (and why the study uses that much memory makes sense) if a studies subgraph occupies memory only if it is actually used. |
[2022-04-05 17:23:27] |
|
In the case of ACSIL arrays, copies are never made. Only references are made to them. Memory is allocated when a Study Subgraph is used and the array size is increased as needed to match the number of bars in the chart. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2022-04-05 17:23:40
|
To post a message in this thread, you need to log in with your Sierra Chart account: