Amit Padhiyar

Amit Padhiyar

  • 1.3k
  • 448
  • 6.6k

How to make timeline scale with fast loading speed?

Jul 27 2019 11:15 AM
Yesterday i was worked on reduce loop size (https://www.c-sharpcorner.com/forums/how-do-i-reduce-loop-size-using-list-or-linq-in-c-sharp) that can make project smooth but i can't find answer.
 
I created shape like
  1. Polyline p = new Polyline();  
  2.             p.Stroke = Brushes.Red;  
  3.             p.StrokeThickness = 1.5;  
  4.             p.Points = new PointCollection {  
  5.                     new Point(x, 20), new Point(x, 40),  
  6.                     new Point(x += XAxis, 40),new Point(x, 34),new Point(x, 40),
  7.                     new Point(x += XAxis, 40),new Point(x, 34),new Point(x, 40),
  8.                     new Point(x += XAxis, 40),new Point(x, 34),new Point(x, 40),
  9.                     new Point(x += XAxis, 40),new Point(x, 34),new Point(x, 40),
  10.                     new Point(x += XAxis, 40),new Point(x, 29),new Point(x, 40),
  11.                     new Point(x += XAxis, 40),new Point(x, 34),new Point(x, 40),
  12.                     new Point(x += XAxis, 40),new Point(x, 34),new Point(x, 40),
  13.                     new Point(x += XAxis, 40),new Point(x, 34),new Point(x, 40),
  14.                     new Point(x += XAxis, 40),new Point(x, 34),new Point(x, 40),
  15.                     new Point(x += XAxis, 40)  
  16.                 };  
This above entire code, I called one segment. I iam creating this segments for 120 mins.
this segment for only 0.010 seconds. This will make too large loop.
 
For example...
 
1 second == 100 loop
1 min == 6000 loop
1 hour == 360,000 loop
2 hour == 720,000 loop
 
So i want to reduce this loop (around 3600).