几何尺寸与公差论坛

 找回密码
 注册
查看: 91|回复: 0

PR 236776 It takes over a minute on a state of the art PC to create a Surface

[复制链接]
发表于 2009-3-26 14:09:30 | 显示全部楼层 |阅读模式
It takes over a minute on a state of the art PC to create a Surface Profile Dimension
<< Neil Kay  --  11/21/05  16:34:36>>
Hold up seems to be in:-
BOOL CXactMinimization:oSurfaceProfile(CXactDatumMinimization & DatumMinimization)
Any optimizing possible here?
Also, in some other places, get_points on the feature is called in a number of places. Can't it be done once, and the points shared in the dimension code?
<<END>>


<< Wade Burton  --  12/05/05  12:22:54>>
Just noticed the changes to these.  Thanks, Don.
<<END>>
<< Neil Kay  --  12/05/05  11:28:22>>
It is indeed 3 times faster. Still 20 seconds is slow, but I'm happy with the improvement.
<<END>>
<< Changes made by Neil Kay -- 12/05/05  11:28:25>>
Status:  RESOLVED to CLOSED
<<END>>
<< Bret Naylor  --  12/02/05  16:32:55>>
Reviewed.
<<END>>
<< Changes made by Bret Naylor -- 12/02/05  16:32:56>>
Action:  Bret Naylor to Neil Kay, Status:  REVIEW to RESOLVED
<<END>>
<< Paola Pallo  --  12/02/05  11:02:19>>
Reviewed.
<<END>>
<< Changes made by Paola Pallo -- 12/02/05  11:02:28>>
Action:  Paola Pallo to Bret Naylor
<<END>>
<< Don Turcotte  --  12/01/05  15:24:27>>
The second thing that I changed was dim_prof.cpp.  This now calls the profile(...) method of the considered feature only once using a new #define PROFILE_BOTH since everything is calculated with one call anyways.  The profile dimension can now be created in less than a third of the original time.
Files inserted to server
------------------------
V40\AUTOFEAT\AFHIGHPOINT.CPP
V40\AUTOFEAT\AFSLOTNOTCHCONTACT.CPP
V40\AUTOFEAT\A_ANGLE.CPP
V40\AUTOFEAT\A_CORNER.CPP
V40\AUTOFEAT\A_EDGE.CPP
V40\AUTOFEAT\A_HIPNT.CPP
V40\AUTOFEAT\A_notch.cpp
V40\AUTOFEAT\A_SURFAC.CPP
V40\AUTOFEAT\A_VECTOR.CPP
V40\BASESCAN\BASICSCN.CPP
V40\CONSFEAT\CONS_SET.CPP
V40\CONSFEAT\FILTEROB.CPP
V40\DIMENS\DIM_PROF.CPP
V40\INCLUDE\DEFINES.H
V40\MEASFEAT\BASIC_FE.CPP
V40\MEASFEAT\M_SET.CPP
V40\SCAN\BASESCAN.CPP
V41\AUTOFEAT\AFANGLEPOINT.CPP
V41\AUTOFEAT\AFANGLEPOINTCONTACTLEGACY.CPP
V41\AUTOFEAT\AFCORNERPOINT.CPP
V41\AUTOFEAT\AFCORNERPOINTCONTACTLEGACY.CPP
V41\AUTOFEAT\AFEDGEPOINT.CPP
V41\AUTOFEAT\AFEDGEPOINTCONTACTLEGACY.CPP
V41\AUTOFEAT\AFHIGHPOINT.CPP
V41\AUTOFEAT\AFHIGHPOINTCONTACTLEGACY.CPP
V41\AUTOFEAT\AFSLOT.CPP
V41\AUTOFEAT\AFSLOTNOTCHCONTACT.CPP
V41\AUTOFEAT\AFSLOTNOTCHCONTACTLEGACY.CPP
V41\AUTOFEAT\AFSURFACEPOINT.CPP
V41\AUTOFEAT\AFSURFACEPOINTCONTACTLEGACY.CPP
V41\AUTOFEAT\AFVECTORPOINT.CPP
V41\AUTOFEAT\AFVECTORPOINTCONTACTLEGACY.CPP
V41\BASESCAN\BASICSCN.CPP
V41\CONSFEAT\CONS_SET.CPP
V41\CONSFEAT\FILTEROB.CPP
V41\DIMENS\DIM_PROF.CPP
V41\INCLUDE\DEFINES.H
V41\MEASFEAT\BASIC_FE.CPP
V41\MEASFEAT\M_SET.CPP
V41\SCAN\BASESCAN.CPP
<<END>>
<< Changes made by Don Turcotte -- 12/01/05  15:25:42>>
Action:  Don Turcotte to Paola Pallo, Status:  OPEN to REVIEW
<<END>>
<< Don Turcotte  --  11/30/05  14:28:07>>
One of the problems here is that when a profile dimension is created, the do_math() is called three times.  This is probably also true for other dimensions, but is only noticeable when the do_math() takes more than a few seconds.  I have fixed this so the do_math() is now called only once.  On my 2 gigahertz box this takes about 20 seconds.
I noticed another problem.  When the program is loaded, the FCF remembers that the profile has a datum, but the internal command did not serialize the datum reference, so the do_math() on loading is called with no datum.  I will file this as a separate PR.
This program is still slow to load, so I will keep looking for other problems.
Files inserted to server
------------------------
V40\DIMENS\FEATCTRLFRM.CPP
V40\MENU\FEATCTRLFRMDLG.CPP
V41\DIMENS\FEATCTRLFRM.CPP
V41\MENU\FEATCTRLFRMDLG.CPP
<<END>>
<< Changes made by Neil Kay -- 11/30/05  12:10:13>>
Action:  Neil Kay to Don Turcotte
<<END>>
<< Wade Burton  --  11/28/05  12:41:08>>
Neil, the attached file is only a .cad file.  We need the .prg file that has the feature, and if it has the dimension already we can remake the dimensions from the example.
Don Turcotte is responsible for the CXactMinimization code, so when you have it route this to him.  I've already mentioned this to him.
<<END>>
<< Changes made by Wade Burton -- 11/28/05  12:41:23>>
Action:  Wade Burton to Neil Kay, Assigned:  Wade Burton to Don Turcotte
<<END>>
<< Changes made by Tim Wernicke -- 11/21/05  14:17:04>>
Priority:  Critical to Stop Rel.
<<END>>
<< Changes made by Tim Wernicke -- 11/21/05  14:16:57>>
Priority:  to Critical
<<END>>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-22 18:50 , Processed in 0.036313 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表