I have an efs used in many intraday charts that evaluates four stochastic conditions using a string of 'if/else if' statements. Based on whichever stochastic condition is true, setChartBG() will paint a particular background color.
The conditions are such that one of them will always be true, and as I understand it, these conditions are evaluated for every single tick throughout the trading day (which could be thousands of ticks). So the chart background could be repainted thousands of times a day. However, any one condition could remain true for hundreds of consecutive ticks, so a repaint (of the same color) is not really necessary.
My question is: Is all that repainting CPU or graphics intensive given the efs is used in many charts? Would it be worth enclosing the setChartBG() color command in an if statement with a flag, so if the same condition is true this tick as last tick, a repaint would not occur? Or in the efs world, is repainting a relatively simple task that is not worth optimizing?
Thank you
shaeffer
The conditions are such that one of them will always be true, and as I understand it, these conditions are evaluated for every single tick throughout the trading day (which could be thousands of ticks). So the chart background could be repainted thousands of times a day. However, any one condition could remain true for hundreds of consecutive ticks, so a repaint (of the same color) is not really necessary.
My question is: Is all that repainting CPU or graphics intensive given the efs is used in many charts? Would it be worth enclosing the setChartBG() color command in an if statement with a flag, so if the same condition is true this tick as last tick, a repaint would not occur? Or in the efs world, is repainting a relatively simple task that is not worth optimizing?
Thank you
shaeffer
Comment