Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Delay when clicking (Read 3283 times)
Per Lindvig
Guest


Delay when clicking
Jan 4th, 2006 at 2:29pm
Print Post  
Hi,

I have for a long time being irritated because of a small delay when clicking on an item in a flow chart, I have finally had the time to look further into the problem, it seems that everytime you click on anything in a flowchart - the CPU usage jumps to 100% and everything is halted for about a second - even on an empty flowchart.

The version I have bought is the ActiveX version 3.0.0, but I have tried to download the newest trial (3.2.4) and it has the same problem.

When you draw and change a flow chart a lot, it becomes a big problem when you have a 1 sec. delay everytime you click on a box to move it.

Are you aware of the problem?

Best Regards
Per
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3444
Joined: Oct 19th, 2005
Re: Delay when clicking
Reply #1 - Jan 4th, 2006 at 3:03pm
Print Post  
Hi,

That could happen because a back-buffer bitmap is created and painted each time the mouse button is pressed. That's needed for faster redrawing while an item is created or modified with the mouse.

GDI+ needs much time to create the buffer bitmap, I guess if there is a whole second delay, then your application runs with a full-screen flowchart on a large monitor? We can try to optimize that by creating the bitmap on the first WM_MOUSEMOVE message instead on WM_LBUTTONDOWN. At least the delay won't happen on simple clicks but only when the mouse is actually dragged.

Until that's optimized, use the standard GDI (geClassic engine), the bitmap creation there is much faster.

Best regards,
glavcho
  
Back to top
 
IP Logged
 
Per Lindvig
Guest


Re: Delay when clicking
Reply #2 - Jan 5th, 2006 at 11:21am
Print Post  
I am actually running in geClassic mode - tried for fun to change to GDI+, there's not much of a change, maybe it's slightly slower.

Regarding the size, I have tried to resize the window to about 640x480, before I can't notice the delay.

It might be a solution to create the bitmap on another event than click. When you use the CTRL-Click function to select multible items in the flowchart you really notice the problem.

Whithout knowing anything about your code, maybe a solution could be to create the bitmap as a stock bitmap upon creation of the control and release it when the control is disposed (of course recreate it if the window is rezised)?

The machine is running at 1.5 GHz, not the fastest, but it should be fast enough.

Regards
Per
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3444
Joined: Oct 19th, 2005
Re: Delay when clicking
Reply #3 - Jan 5th, 2006 at 1:54pm
Print Post  
It probably depends more on the video card and video memory than on the processor speed. On my 1.6MHz there isn't any noticable delay with GDI but quite a delay with GDI+. GDI+ does not use any video hardware accelleration available, whereas the classic GDI does use the hardware capabilities.

Anyway we'll try to optimize that somehow.

regards,
glavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint