Why are my Visio files so large?

Post to Twitter

This Document Stencil contains over 100 unused master... the only one used is at the lower right

Something we’ve heard often over the years from various clients, customers, and users is, “There’s not much in my drawing… why is the file so big?”  Of course, there can be several reasons for this but one of the most common is the concept of “unused master shapes.”  Huh? I’m glad you asked.

The icons on a Visio stencil represent what’s formally known as Master Shapes.  For example, when you drag a shape representing a server onto a page and place it into a rack, a copy of the Master is placed in the drawing’s Document Stencil which you can’t see (more on that in a bit), and what appears on the page is an Instance of the shape.  An Instance is a pointer to the shape in the Document Stencil, kind of like a copy.  So, if you place a dozen servers in your rack elevation, you will have a dozen pointers back to the one shape in your Document Stencil.  This is one way that Visio actually keeps the file size down and performance up.

You can see the Document Stencil by selecting File > Shapes > Show Document Stencil.  It looks like a regular Visio stencil but it contains only the shapes that you have placed in your drawing.  However, if you delete all of the Instances of a shape, such as those 12 servers in your rack, there will still be a server shape in your Document Stencil.  In other words, the Document Stencil maintains a stock of every shape that you have placed in your drawing even if you’ve deleted them all from the pages.

Over time, a Visio file may become bloated especially if it has been worked on and modified frequently.  Let’s say you’re changing out the equipment in your rack and you delete all of those servers and replace them with patch panels, routers, and other stuff.  The server shape will still be on your Document Stencil as will all of those patch panels, routers, and other stuff.  The next time the rack is provisioned, that stuff may be deleted but the shapes are still in the Document Stencil.  Get the picture here?  It’s like an attic that accumulates junk that you no longer use in your house.

This Document Stencil contains over 100 unused master... the only one used is at the lower right

This Document Stencil contains over 100 unused masters... the only one used is the very last one on the bottom row above

So the file size grows and grows even though there’s not much in the drawing.  The best thing to do is clean out the “unused Masters” from your drawing.  Visio 2007 has an easy way to do this.  Select File > Remove Hidden Information and then the File Size Reduction tab.  Checking the “Remove unused master shapes” box will clean the Document Stencil and reduce the file size.

In the example below, there are just two equipment racks in the drawing but the file size is a whopping 2 MB!  The Remove Hidden Information box shows 103 unused master shapes.  Although this is just a sample drawing to illustrate the point, it’s not unusual for a drawing that’s been used for years to have over a hundred unused masters.  After cleaning them out, the file size shrinks to 200 KB… quite a difference.

Sample drawing with 2 equipment racks Check the box next to "Remove hidden masters" to clean the Document Stencil
What if you’re still on Visio 2003?  That version has no built in feature to clean the Document Stencil but Visimation has a free tool called VisiClean that you can download from our ShapeSource store.  VisiClean will clean individual drawings that you open.  If you want to clean many files at once in a batch mode, VisiBatchClean is another tool for sale at ShapeSource.

© 2009 – 2010, Visimation. All rights reserved.

Post to Twitter

5 comments to Why are my Visio files so large?

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>