OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: velasquez on September 20, 2009, 07:36:24 AM

Title: Difference of Exhibition
Post by: velasquez on September 20, 2009, 07:36:24 AM
Hi Owen, 
In this Project I work with dcl_Control_SetPos and 
dcl_Control_SetPicture to control the exhibition of images. 
See the difference among this work in OpenDCL 4.1.2.2 and OpenDCL 5.1.2.3 / 6.0.0.4 
That is expected?
Title: Re: Difference of Exhibition
Post by: owenwengerd on September 20, 2009, 08:33:39 AM
Try removing your calls to (dcl_PictureBox_Clear) to see if that resolves the problem.
Title: Re: Difference of Exhibition
Post by: velasquez on September 21, 2009, 05:25:17 AM
Hello Owen,
 
Following your suggestion I removed dcl_PictureBox_Clear of my code. 
There was not any visible improvement in the change of the images.
Can the problem be in the speed of OpenDCL 6.0.0.5 or in ZOrder?
Title: Re: Difference of Exhibition
Post by: owenwengerd on September 21, 2009, 08:34:41 AM
If you use ZOrder, that could be the reason. Please send me an updated .lsp file without the calls to PictureBox_Clear, so I can have another look.
Title: Re: Difference of Exhibition
Post by: velasquez on September 21, 2009, 11:52:12 AM
OK Owen
 
I don't use ZOrder. 
I sent for you one updated .lsp without the calls of PictureBox_Clear. 
Please see the functions JoyMenuValvulas and JoyMenuAducaoAgua.
Title: Re: Difference of Exhibition
Post by: velasquez on September 21, 2009, 12:37:37 PM
Hello Owen 
I believe that the problem can be with the dcl_Control_SetPos speed for PictureBox.
Title: Re: Difference of Exhibition
Post by: owenwengerd on September 21, 2009, 01:32:47 PM
I didn't receive any new file from you. I looked at your code, and I think the main problem is that your calls to Control_SetVisible cause the controls to be hidden, then redisplayed. This would force the background to repaint, thus causing the flashing.
Title: Re: Difference of Exhibition
Post by: velasquez on September 22, 2009, 10:18:21 AM
I created a new project with OpenDCL 6.0.0.5. 
I am just exhibiting the form that contains the images. 
I verified that the exhibition speed is really larger in OpnDCL 4.1.2.2
Title: Re: Difference of Exhibition
Post by: velasquez on September 22, 2009, 10:21:06 AM
I am posting the files now. 
Excuse me.
Title: Re: Difference of Exhibition
Post by: owenwengerd on September 22, 2009, 06:19:36 PM
On my computer the form opens virtually instantaneously in Alpha 5 on AutoCAD 2010. I ran it under a profiler, and I don't see anything in the output that indicates a problem. I added a slight optimization so that it doesn't waste any time trying to paint the picture before the dialog is visible, but I don't think that is significant enough to notice.  I don't know why it is slow on yours.  Perhaps someone else can test your sample to see if they notice any problem.
Title: Re: Difference of Exhibition
Post by: velasquez on September 23, 2009, 04:27:26 AM
I don't also understand the problem. 
The one that I can affirm that in OpenDCL 4.1.2.2 the form opened with a very larger speed in AutoCAD 2006 2007 and 2009 for this it is enough to see the image that shows this comparison. 
I hope other users see the files that I posted. 
Thanks.
Title: Re: Difference of Exhibition
Post by: velasquez on September 23, 2009, 04:42:10 AM

It follows the transcription of my customer's report below on OpenDCL with AutoCAD 2010. (5.1.2.3)

Thank you Sebastião… 
 
All works now.. I changed T for the 1 et NIL for the 0 only in the command “DCL_CONTROL_SETVALUE” 
 
But with Autocad10 the speed is horrible... .Este another problem... 
 
Att. 
Christophe

For display to the picture with the 12 pictures,:  5 seconds.   
Before, it was smaller of 1 second 
 
I have a RAM of 1,25 GB 
 
Att. 
Christophe
Title: Re: Difference of Exhibition
Post by: owenwengerd on September 23, 2009, 07:43:22 AM
What is the speed of opening the sample file in 6.0.0.5 on your system with AutoCAD 2009?  Is there a noticeable difference if all picture boxes are removed from the form?  Is the customer's report based on the sample, or on the real application?
Title: Re: Difference of Exhibition
Post by: velasquez on September 23, 2009, 09:29:30 AM
The speed of opening of the sample file in my system is very slow in AutoCAD 2006-2007-2009-2010. 
Yes there is a notable difference when PictureBox are removed from the form. 
The customer's report this based on the real application.
Title: Re: Difference of Exhibition
Post by: BazzaCAD on September 23, 2009, 10:42:09 AM
I tested your sample files on Win XP Pro SP3 w/ 4gb. ram.
On Acad 2008 & 2010
ODCL Builds: 6.0.0.5 & 5.1.2.3
In all cases the form loaded very fast, less then 1 sec.
I could see each pic. box loading one at a time, but it wasn't a noticeable delay.
Title: Re: Difference of Exhibition
Post by: velasquez on September 23, 2009, 12:15:48 PM
Imagine this with 1 or 2 GB of ram. 
With the construction in ODCL 4.1.2.2 there was not any delay.
Title: Re: Difference of Exhibition
Post by: owenwengerd on September 23, 2009, 12:16:58 PM
Quote from: velasquez on September 23, 2009, 09:29:30 AM
The speed of opening of the sample file in my system is very slow in AutoCAD 2006-2007-2009-2010. 

Can you be more precise than "very slow"?  10 seconds? 2 seconds?
Title: Re: Difference of Exhibition
Post by: velasquez on September 23, 2009, 01:06:33 PM
For not prolonging more the discussion is enough to look the first image of this post and to verify the difference. 
They are not all the users that can have equipments with 4 ram gb or more. 
OK if the new version cannot work as the previous.
Title: Re: Difference of Exhibition
Post by: owenwengerd on September 23, 2009, 02:07:00 PM
Your response sounds rude, like you can't be bothered to spend any more time on helping to get this problem resolved. I hope it's just my incorrect interpretation.
Title: Re: Difference of Exhibition
Post by: velasquez on September 23, 2009, 02:46:41 PM
Excuse me if my answer sounded rude. 
I tried to demonstrate of all the ways a problem that I found. 
I am willing to spend the time that goes I need to solve. 
But first it is necessary that the problem is recognized. 
I apologize again.
Title: Re: Difference of Exhibition
Post by: owenwengerd on September 23, 2009, 04:00:35 PM
No problem. I'm glad you are willing to help. As you say, first the problem must be identified. That is why I asked for a more precise description of what you mean by "very slow". Without that information, I can't be sure that you are seeing different results than me.

You mentioned that your client reports that the application is slow, but I already found that calls to SetVisible account for a lot of redrawing, and would slow it down. Are you sure that isn't the only problem?
Title: Re: Difference of Exhibition
Post by: velasquez on September 23, 2009, 04:38:29 PM
I stopped using SetVisible and dcl_PictureBox_Clear in runtime.   
I also tested below the code but nothing changed.
Code (autolisp) Select

(defun c:TestFlashing_A-TesteForm_OnInitialize (/)
   (foreach item '("PictureBox1" "PictureBox2"
    "PictureBox3" "PictureBox4"
    "PictureBox5" "PictureBox6"
    "PictureBox7" "PictureBox8"
    "PictureBox9" "PictureBox10"
    "PictureBox11" "PictureBox12"
   )
      (dcl_PictureBox_LoadPictureFile
"TestFlashing"
"A-TesteForm"
item
(strcat "D:\\DuctilCAD-2010\\Imagens\\" item ".jpg")
      ) ;_ fim de dcl_PictureBox_LoadPictureFile
    ) ;_ fim de foreach
)

The load of PictureBox can be seen per time.   
In all the tests you can see the load of each PictureBox. 
In OpenDCL 4.1.2.2 this difference could not be seen even with only 1gb of ram.
I make the tests in a computer with little RAM memory. 
Title: Re: Difference of Exhibition
Post by: owenwengerd on September 23, 2009, 06:28:07 PM
So, how slow is "very slow"? Is the problem with overall speed of displaying the form, or is it with the visual effect of being able to see the images painting in sequence? In other words, would it appear to be faster if no painting occurred until the very end of the process, then all images painted quickly after everything else has loaded? Once I know exactly what the problem is, I can look at what may have changed in the code, but at this point I still don't know exactly what the problem is.
Title: Re: Difference of Exhibition
Post by: velasquez on September 24, 2009, 04:53:35 AM
The speed is "very slow". 
The problem is not in the speed of exhibiting the form. 
It i with the visual effect of being able to see the images painting in sequence.
Yes, would it appear to be faster if no painting occurred until the very end of the process, then all images painted quickly after everything else has loaded.