高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】complex models, running out of memory
complex models, running out of memory.
complex models, running out of memory.
i am trying to use directdwg to load autocad models, and convert them to my 3d format. everything works fine, except for really complex models. it seems that directdwg must load the whole file into memory, which for these models will exceed the 2gb memory limit on windows platforms, then i get an excetion, i assume out of memory thrown by the library. is there anyway around this, i.e. virtual memory(on disk) manager, or a way to reduce the overhead?
thanks,
quincy
if such file contains a large number of objects partial loading and paging may help. (see developer's guide/paging support).
but if 2g file contains single huge object where is nothing to do...
sergey slezkin
thanks, yes it is definately a large number of semi-complex objects. i will look into this, but i am sure this is what i am looking for.
thanks,
quincy
quote:
originally posted by sergey slezkin
if such file contains a large number of objects partial loading and paging may help. (see developer's guide/paging support).
but if 2g file contains single huge object where is nothing to do...
ok, i believe i have the paging setup properly according to the developer's guide. however, i am not seeing any processing, or memory reduction in the svcs.readfile() function. it takes the same amount of time/memory to loadno matter what the bpartial flag is set to? therefore it still seems it is loading the whole file right then, and even with paging it still gets really large heap sizes? what else could i be doing wrong?
thanks,
quincy
what is file type and version? and which dd version?
partial loading does not work for dxf and dwg r12.
and partial loading for dwg r13-r15 was implemented in one of latest dd versions.
sergey slezkin
quote:
originally posted by sergey slezkin
what is file type and version? and which dd version?
partial loading does not work for dxf and dwg r12.
and partial loading for dwg r13-r15 was implemented in one of latest dd versions.
i believe it is dwg file from autocad 2005. it appears that i am running directdwg 1.13 from 6/23/2005. is this version recent enough? i am currently trying to migrate to 1.14, but for some reason i now get linker errors:
error lnk2001: unresolved external symbol "public: virtual bool __thiscall oddbhostappservices::getdelobjs(void)const " (?getdelobjs@oddbhostappservices@@ube_nxz)
error lnk2001: unresolved external symbol "public: virtual void __thiscall oddbhostappservices::setdelobjs(bool)" (?setdelobjs@oddbhostappservices@@uaex_n@z)
error lnk2019: unresolved external symbol "public: static unsigned long __cdecl odgirasterimage::calcscanlinesize(unsigned long,int)" (?calcscanlinesize@odgirasterimage@@sakkh@z) referenced in function "public: virtual unsigned long __thiscall odexgirasterimage::scanlinesize(void)const " (?scanlinesize@odexgirasterimage@@ubekxz)
any ideas on this also?
thanks,
quincy
dear quincy,
about unresolved externals - it seems like you're trying to use together include files for dd 1.13 and libs for 1.14. if so - it definitely not good idea, you should use corresponding include files and libraries.
sincerely yours,
george udov
i checked 1.13.0 - loading files in odamfcapp and looking at memory occupied by the application:
application occupies 5.8m before file loading
chevy.dwg from r14 samples:
full load - 25m
partial - 16m
stadium plan.dwg from ac2005 samples:
full load - 52m
partial - 28m
note that odamfcapp acceses some objects to fill tree control. the difference between full and partial load must be greater immediately after readfile().
are you checking memory in odreadex after readfile() of after odreadex finished working? note that it accesses all objects causing their loading into memory.
sergey slezkin
alright, i am definately getting a partial load on my .dwg file. the only problem now is that some of these files still are exceeded my memory limits (2gb) while loading. is there a way to force directdwg to use paging, or virtual memory during the load? this seems to be my biggest problem.
thanks,
quincy
|