几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】reducing memory usage paging (http://www.dimcax.com/hust/showthread.php?t=18388)

yang686526 2009-05-07 12:46 PM

【转帖】reducing memory usage paging
 
reducing memory usage & paging
reducing memory usage & paging
hi there,
we're writing an app that generates dwgs, and we're trying to cut down the time it takes and the amount of memory used.
so far we're using expagecontroller and have removed auditing and disabled thumbnail generation. paging reduces the amount of memory consumed when creating the features, but they all get brought back into memory again when we call writefile() and so we end up using the same amount of ram anyway.
is there anyway around this or are there any other things we can do to boost performance?
cheers
writefile() call's progress meter callback. in this function you can page objects back on disk from time to time. this may reduce memory usage but will slow down performance.
sergey slezkin
thanks sergey,
we've modified our services class to call oddbpageobjects occasionally in the progress meter callback, but if we do this the dwg that is generated is corrupt.
there's nothing in the audit report, and running a recover in autocad seems to work. also, the corrupt file comes out slightly smaller (292192 bytes vs 292647 bytes).
are we doing something wrong here?
could you post "good" and "bad" dwg files? i mean created with and without calling pageobjects.
also 2 dxf files would be helpful.
sergey slezkin
dwg files
quote:
originally posted by sergey slezkin
could you post "good" and "bad" dwg files? i mean created with and without calling pageobjects.
also 2 dxf files would be helpful.
see attached. the content is the same, the only difference is calling pageobjects.
i'll try and get some dxf versions of the same files tomorrow.
thanks
this seems to be a bug in saving dwg r13-r15.
does it work for you while saving to dwg r18 (ac2004) and r21(ac2006)?
sergey slezkin
i fixed a number of issues in paging. it had problems not only while saving to dwg r13-15.
fix will available in next release/update.
sergey slezkin


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