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

yang686526 2009-05-07 02:58 PM

【转帖】rendering Performance
 
rendering performance
rendering performance
i am looking for recommendations on improving the rendering performance with dwgdirect 1.11. i have some drawings that take about 80 secs to regen in the mfc sample app using the wingdi vectorizer. are there any flags i can set or operations i can perform on the drawing to cut down the rendering time? i have noticed the drawings that are rendering the slowest, have multiple viewport objects in the paper_space. i was wondering if there is a direct relationship between the number of viewports and the rendering time. if there is a direct relationship, are there any operations i can perform to reduce or combine viewports to simplify the drawing? btw the same drawings exported as dwf files render in a couple of seconds.
thanks,
where is direct relationship between number of viewports and regen time.
the most effective way for improving redraws speed is not to call regen at each redraw. this can be achieved by using device-dependent geometry cache.
1.11 contains one more sample device impementation - gl device with caching. during regen gl list is stored and redraws (for restoring window, zoom, pan, rotate) are performed by playing back gl list. if such device is used application is responsible for calling regen if it is required (for example if you zoom in a circle you can see that it's drawn as polyline and regen will make it smooth again by increasing number of segments).
for wingdi wmf can be stored.
next release will contain some new features to improve redraws and regen speed. for now only the whole view caching is possible like in "gl with cache" device sample.
sergey slezkin
thanks,
i am hoping to not only improve the redraw performance, but also the initial render performance which i don't think will be helped with geometry caching. i believe that the slow rendering performance for these files has more to do with the number of viewports than the actually geometry that gets rendered. comparisons of rendering speeds between layouts with multiple viewports and one viewport ( with the same or similar geometry ) show layouts with multiple viewports rendering significantly slower. i am not very knowledgeable about autocad or cad in general, so there may be an obvious explanation why this is the case that i am missing. is there a way to merge viewports to improve performance? the old toolkit does not seem to have this same performance hit on initial render. a test file with 10 viewports takes under 10 secs to do initial render with the toolkit and over 80 secs in dwgdirect. any insight or additional suggestions you can provide would be greaty appreciated.
thanks again,
mike


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