Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic 2 problems (Read 1895 times)
pelion
Junior Member
**
Offline



Posts: 61
Joined: Nov 12th, 2006
2 problems
Jan 8th, 2008 at 8:45pm
Print Post  
Hi Stoyo, Happy New Charting Year

I am having a couple of frustraing issues that I've tried a bundle of things to get around, but nothing is working correctly.

I have a chart that is displaying 7 different sections of information that can update seperately depending on user interaction, so instead of redrawing the whole chart every time a user clicks (which was creating an unacceptable lag), I am redrawing only the section that the user requested to be changed.

I am currently doing this by grouping the individual sections, the deleting the group to change, and rebuilding it (then rearranging the other groups around it if it has changed size)

1) When I do this, I lose the scroll bar, the handles on the end of the scroll bar are still there, however the bar itself disappears. Is there any way to force a scroll bar refresh?

2) The group delete is taking a ridiculously slow time to perform. I have timed some occasions at 30 ms to hide a group as opposed to 3 - 5 seconds to delete a group and all its objects, however simply hiding groups and rebuilding them creates lags after a time, as the hidden object are still recognised as chart objects.

I have tried hiding the changing group, and sending the group off to an Asynchronous clean up method, but was disallowed as the chart cannot be affected by a separate thread than that it was created on, and setting Control.CheckForIllegalCrossThreadCalls = false made bad things happen. Is there any way to speed up the deletion of objects in a group, or a defined section of the chart?

I have tried fixing these by building each section asynchronously in individual background flowcharts, and building a new main chart each time by using the new Box (prototype) method, but the flowchart libraries appear inherently thread unsafe, and even though I am using separate FlowCharts, some calls appear to have threading clash issues, corrupt memory exceptions and 'parameter incorrect' exceptions.

Thanks in advance and any assitance would be greatly appreciated
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: 2 problems
Reply #1 - Jan 9th, 2008 at 6:16am
Print Post  
Hi and Happy New Year!

How many items are there in the group, and how are you deleting it? Check if disabling undo/redo will improve the performance.

If you are still using version 4 and displaying images in the diagram nodes, set the nodes' Image to null before deleting them. That will prevent Flowchart.NET from calling GC.Collect when items are removed from the diagram, which would improve the performance a bit.

FlowChart.NET is not thread-safe, but you could use the Control.Invoke(Delegate) method to call methods that change the flowchart from a worker thread.

You can get access to the scrollbar controls via the HScrollbar and VScrollbar properties, and then force them to repaint themselves via the Scrollbar.Refresh method.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
pelion
Junior Member
**
Offline



Posts: 61
Joined: Nov 12th, 2006
Re: 2 problems
Reply #2 - Jan 9th, 2008 at 7:43pm
Print Post  
Fantastic Stoyo, thanks again, disabling undo and nullifying images works a treat.

I think the scroll bar issue was caused by a Suspend Layout call on the chart that never got to its ResumeLayout call (due to a dubiously coded function of mine)

I have to say you provide the best support of any of the third party libraries we are using, well done
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint