几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】readfile90 problem (http://www.dimcax.com/hust/showthread.php?t=18341)

yang686526 2009-05-07 12:28 PM

【转帖】readfile90 problem
 
readfile() problem
readfile() problem
i have a problem opening big acad files (4-6 mb); i noticed exactly the same behaviour using singledoc example, odamfcapp works fine.
the first time i open big dwg file it takes only 2 or 3 seconds to complete readfile() operation, but starting from second time (in the same application run) it takes 6 seconds or more, and memory seems to grow up, although i release all objects before re-open the file.
i'm using 1.13 but i have the same problem with 1.12
thanks,
marco
from faq:
quote:
on windows 2000 or windows xp, repeated loading of large files in dwgdirect may cause performance to degrade. the cause of this degradation is that the crt small-block heap is not used by default on windows 2000 or xp. the use of the small-block heap can be forced by making the following call:
#include
int sbh = _set_sbh_threshold(1016);
for more details about this problem see: .
odamfcapp calls
_set_sbh_threshold(1016);
in initinstance()
sergey slezkin
thank you sergey, i modified my code and now it works fine!
marco


所有的时间均为北京时间。 现在的时间是 07:45 PM.