PDA

View Full Version : Beware! A real "gotcha"!


Steve
10-21-2003, 04:38 PM
As some of you may have noticed from a recent thread of mine here and in the Work Manager forum, I have been plagued recently by extremely slow load and save time for Annotation drawings pulled out of Work Manager.

With a little luck, and lots of help from Paul and the folks at CoCreate Tech Support, I've figured out what was causing it, and I figured I would share it with you because it can easily happen to anyone who is storing Annotation drawings in Work Manager.

Here is the deal as I understand it:

Some 4 months ago or so I had done some "cut and pasting" out of ME10 and Annotation to make some PowerPoint presentations. Somewhere along the way I must have "pasted" while I was in Annotation.

It seems that whenever you "Cut and Paste" in Annotation, the pasted geometry gets stuck up in the "root level" of the structure of the displayed drawing. In other words, if you look at the Drawing Browser you will see your drawing listed at the top (root) level, and your subsequent drawing sheets listed under it. It seems paste geometry gets tucked up at the root level. You can't see it, but it is there.

Now if you open a new drawing from the file system, all is well, because when you open a drawing from the file system the first thing that the system does is a "drawing delete", which wipes out the whole tree of the last drawing you were working with - then the system opens the drawing you requested from the file system. All is well.

The problem comes if you open a drawing out of Work Manager. There is a defect with Work Manager that instead of doing a "drawing delete" before pulling up a new drawing, it does a "sheet delete", which somehow leaves behind the "image" of the cut and paste geometry you worked with before. And when you save this new drawing, guess what? That image now has been "impressed" onto the new drawing, too, and gets saved with it. This will happen to any and all drawings that you open and consequently save, until you either do a drawing delete or restart the software, which flushes the memory. Essentially, every drawing you touch becomes "contaminated" with the "echo" of the cut and paste geometry stuck in memory.

Let's say you open that drawing again and again, though, as you work on it, and you haven't done a drawing delete or restarted your software in a while. Every time you open the drawing, the cut-and-paste ghost image doubles in size!. Moreover, if you then open another drawing, that now-doubled ghost image gets stamped onto it, too. So in effect, you get exponential growth of the size of the cut-and-paste geometry every time you open and then save a drawing. In one example, I had a 5MB drawing balloon to 35MB because of this.

The end result of this was that my system performance was getting slower and slower. The breaking point came last Monday (10/13) when my drawings started to take anywhere from 10 to 40 minutes to load and save!

The way I could tell something was "stuck" on my drawings is that whenever I opened a new drawing for a split-second before the drawing regenerated I could see the ghost image of the cut-and-paste geometry superimposed on top of my drawing. Since this geometry was for a project completely unrelated with what I am currently working on, I knew it should not be attached to this drawing. Further, once the drawing was open, we found that we could make the ghost image appear again by double-clicking on the active drawing sheet field in the bottom-right hand corner of the Annotation screen.

The Fix
Preventing this "sticky" image in memory is simple - before opening any drawing first delete the active drawing. You can do this by using File -> Delete Drawing or use the Delete Drawing button on the Drawing button menu. This competely wipes out the last drawing from memory, including any cut-and-paste geometry that might be lurking about.

If you have a drawing that is "contaminated", there is also a fix (thanks again to Paul at CoCreate for coming up with it):

1) First, open the drawing out of Work Manager into Annotation.
2) Save each sheet of your drawing to the native file system using the file type sheet (*.mi). You have to export each sheet individually. This leaves behind the ghost image.
3) Delete the active drawing, either by using File -> Delete Drawing or use the Delete Drawing button on the Drawing button menu.
4) Load the sheet(s) that you saved in step 2 by using the file type of Import 2d (*.mi, *.dxf, *.dwg, *.igs, *.iges) as you load your saved sheets from the native file system.
5) Now you can put the fixed drawing back into Work Manager by using a Save 2D in the normal fashion.

Hope this saves some of you some head banging!

Steve

May Kung
10-21-2003, 05:42 PM
While I haven't seen that exact same problem, we got bitten by the same issue with deleting the entire drawing to ensure "corruptions" at root do not get propagated to successively loaded drawings. One of the symptoms of this corruption was very long Print times, as the spooler had to load huge files.

Prevention was to use the Delete Drawing command between loads. Fix was to export individual sheets and "reknit" them back together.

I seem to recall a flag we set in our customization files. When we load an Annotation drawing (either from WM or locally), a dialog box pops up, asking if we really want to load the file, as it will delete whatever is currently in the session. The flag controls whether this command does a Delete Drawing (including clearing the buffer) or just a lower strength delete.

In the meantime, I still Delete Drawings between loads, just to be sure. That, and after saving a file, I do so also and reload the file, just to be sure. :)

Thanks for the heads-up, Steve. Copy/paste from Annotation (after inverting colors) is very popular amongst users here. I'm going to test it out here and see if the flag we have prevents this problem from arising.

BTW, what release of Annotation are you running?

John Scheffel
10-22-2003, 10:40 AM
I don't have anything to add, but would like to thank Steve for taking the time to post this lengthy description of the problem and workaround. Posting information like this doesn't provide any benefit for the person who does it, but it can help many others. I would encourage other members (and the lurkers out there) to do more of the same. The forum isn't just a place to ask questions and seek help, it is also for sharing information and experiences which may benefit others. That's why forums such as this are often called "communities". ;)