|
-
Aug 23rd, 2011, 08:04 AM
#27
Re: Slow animation of a lot of data
 Originally Posted by AussieDave
@NT: I debate that too much stuff is being drawn on the screen because there are only every 50-100 atoms. You say that the code to do it doesn't take too long but the drawing does. If I set a start time at the top of the OnPaint routine and then a finish time at the end of it, and then print it to a log, does that interval not contain all of the drawing? Does the drawing instead get passed to a seperate thread perhaps and gets done in its own time?
As far as I understand it, and that might not be 100% correct, the code in the Paint routine (code such as Graphics.DrawEllipse, DrawLine, etc) merely instructs the control what to paint. The painting itself is done by windows I guess.
There are 'only 50-100 atoms', true, but there are 50-100 atoms per time step. If yuo're doing everything correctly, you should only be drawing 50-100 atoms at a time. If you're not, you might be drawing an EXTRA 50-100 atoms every time step, resulting in 50-100-150-200-250-300-350, etc, and this number rises very fast.
Again, without seeing yuor code there is no way to tell, but I think it could explain why it is slowing down.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|