Support Board
Date/Time: Thu, 06 Feb 2025 04:54:17 +0000
Study with large number of persistent variables
View Count: 1068
[2020-04-16 16:18:13] |
@sstfrederik - Posts: 406 |
Hi SC, I recently noticed that when a study with a large set of persistent variables is loaded on a chart with a large number of bars (20 day tick chart vs 20 time based chart) it shows quite a high study calculation time (several hundreds of ms). Although no calculations are performed in this study. This is just from the declaration of these persistent variables. I tested this on a skeleton study were nothing is done but using 150 float& Example= sc.GetPersistentFloat(0); declarations. Is there something that can be done about that other than loading less bars? It makes the study look slower than it actually is. Frederik |
[2020-04-16 18:21:58] |
Sierra Chart Engineering - Posts: 104368 |
Change to manual looping. Manual looping is always going to be the best performance. If you change all of your studies to Manual Looping you should get a significant performance improvement. As a custom study developer that should be the preferred method. Automatic looping was developed to make code development easier to understand for users for simple studies. Refer to: Working with ACSIL Arrays and Understanding Looping: Manual Looping/Iterating We can also create persistent variables which use a simple array and not a map and this will improve performance further. We had been thinking about that recently. 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: 2020-04-16 18:35:44
|
[2020-04-16 20:10:29] |
@sstfrederik - Posts: 406 |
Manual looping looping solved the high calculation time on study load so that will be the way fwd for this study. Thanks.
|
To post a message in this thread, you need to log in with your Sierra Chart account: