Memory, 2004 vs 2005, or else?

Discussion in 'AutoCAD' started by Fatfreek, May 10, 2004.

  1. Fatfreek

    Fatfreek Guest

    I have an Autolisp routine that creates from a blank drawing, very large
    drawings. Under version 2004 and an older machine (Athalon 900mhz with 1.25
    Gb Ram) under Windows 2000 Pro, it recently (and mostly successful) created
    a 75 mb drawing. Yes, I was able to save it but frankly was not able to
    close Autocad gracefully. FWIW my program reports in separate text file,
    memory in use at certain program milestones and at program's end, 91% memory
    was in use.



    My point here is that the routine completed its run.



    About this same time, I received in the mail version 2005 and I installed
    that on the old machine hoping the new version would ease what looked like a
    memory problem. I then decided to try that same task using 2005 but it
    never completed more than 50% of the drawing before the following error
    message appeared:



    ; warning: unwind skipped on exception

    ; error: Exception occurred: 0xE0000001



    That and several other experiences suggested that I could be approaching
    hardware limits so I built a new machine, this one with a Pentium P4, 3 Ghz,
    and 1.5 Gb Ram. While building the new machine I also decided to modify my
    lsp code with the objective of conserving memory, this by creating the
    drawing in pieces, where I could later reassemble the entire drawing later.
    To put it simply, while I deposit a certain count of entities I Wblock those
    to Filename1.dwg (which naturally erases them from the current drawing) and
    proceed. . deposit so many, Wblock to Filename2, and so forth. This way,
    the current drawing under which the Lisp operates, can never get larger than
    a certain amount - or so I figured.



    Yesterday, I was excited as I tried the new code under 2005. I watched as
    entities were laid down until my entity limit was reached (I set it to
    10,000) and then disappear as Wblock did its thing. Then, more entities,
    etc. However, despite my regular offloading I noted more and more disk
    activity where at only 1/5 of completion the disk light was on constantly.
    The drawing never finished beyond some 95% completion when that dreaded
    error message appeared again.



    I then installed 2004 (better get the sheriff after me) and tried the same
    task. It finished! Yes, it took nearly 5 hours, and had the same heavy
    disk activity as 2005 - but it completed the drawing. Yes, the final
    drawing was comparatively small, some 7.5 Mbytes and I saved that drawing
    "piece" and I believe I can reassemble the drawing for plot time when I need
    to. My memory report at conclusion showed some 76% (x 1.5 = 1.14 Mbytes?)
    of RAM in use.



    I have several questions here. The main one is why so much disk activity
    since I'm Wblocking my entities to disk in stages - in essence, offloading
    drawn entities to other disk-based drawings?



    After each Wblock operation should I also be doing a SAVE. Perhaps SAVE
    does some special type of purging of the drawing database? How about a
    formal PURGE following each Wblock?



    As it stands, I create these entities from, not one, but a number of lists.
    As I Wblock a set of entities, and to conserve memory, I setq that list to
    NIL since it is no longer needed, then move on to the next list.



    Is there anything else I can do along the way to stop this disk swapping and
    use more of the RAM I bought?


    Len Miller
     
    Fatfreek, May 10, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.