A few days later

     As I was saying in  the previous post, the painting of the chart or what you actually see on the screen was very slow when it had to paint huge amounts of data like 30000 bars together with all the plots and the entire graphical image. So I decided to improve it so here I am after 4 days ready with testing the new idea. Did it work, well yes, it worked and the idea is good, the painting time went from 2-3 seconds to 0.7-1.4 seconds which is significantly faster, still a bit slow I was expecting a permanent under 1 second but it is better no doubt about it. It can also be slightly better with a bit of code tuning hence I will proceed with the idea. why do I need to proceed with the idea well it is because while I did manage to increase the speed I also manage to spoil the paths, meaning that this idea does not match with the way the rest of the zooming code was made and now everything is either displaced either slightly not aligned and its a mess. Of course it is as the entire drawing of the chart code was made to fit the previous way of painting the chart this new way disturbs everything but the principle is working so now its time to take it slowly and recreate the drawing code from the start that is from where the data is added to the paths. Hopefully along the way no impediment will appear and everything will fit in to place. But the thing is that modifying this will affect other things as well like update of the chart. To update the chart new data must be inserted, and new data is inserted the old way in the paths and the paths are not good so I have to change them hence after I finish the drawing code I have to go to the update code, and who know where else from there because every tiny part is a wheel in a machinery engine and if some tiny thing fails everything fails. So its more work but I suppose its worth it as I like to make this program as good as I would use it if it would not made by me. 

    Will it be fast enough so it does not bother me, I suppose it will, it is now, or it was before I spoiled it with the new idea, as you can see in previous post, actually zooming 30000 bars is quite futile and useless however it must work acceptabe fine even then and 3 seconds is not acceptable that is why I will proceed with the work and it will take time, especially since I`m only working now and then when I`m in the mood.    

    Right now, I just installed STEAM to play a game, its a while, a few months I guess, since last time I played anything. So I`m in the mood to play a bit of old strategy games like Age of Empires and Stronghold. 

Comments