I have a process that refreshes a 1000 line graph while a TrackBar scrolls.
I’ve done some StopWatching and found that ZGC.Refresh() accounts for 90% of the process run time. The ability to see the graph progress as the TrackBar scrolls is essential to the program. Is there any way to optimize the efficiency of ZGC.Refresh() so my program can run faster?
You could use something like ANTS Performance Profiler to narrow it down to exactly what part of the Refresh() method could use optimization.
Excluding optimization to the method itself, would it be possible to generate a graph that is larger than you actually need and then display only a portion of that graph, letting the scroll change what portion of the graph is currently displayed?