Visio memory problem, when saving images of pages.

S

sonzos

Hey,

Im currently working on a solution, where i need to save each page in a
visio document as a picture.
The problem is the memory, the document is 160 pages.

I use For each to step through all pages of the document, and saves
each page with the page.Export(Filename) function. For each page saved,
visio uses more and more memory. When it is finish, Visio uses 1,9GB of
memory, and it stays at that amount, until i restart visio.

I tried to use GC.Collect(), and setting the
visio.application.undoenabled = false, but neither of them helps with
the memory.

I use VB.Net.

Søren
 
M

Mark Nelson [MS]

How much memory does Visio use without exporting the pictures? By this I
mean that you should comment out the line of code that exports the image but
keep the code that iterates through 160 pages. I'm wondering how different
the memory usage is.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Hey,

Im currently working on a solution, where i need to save each page in a
visio document as a picture.
The problem is the memory, the document is 160 pages.

I use For each to step through all pages of the document, and saves
each page with the page.Export(Filename) function. For each page saved,
visio uses more and more memory. When it is finish, Visio uses 1,9GB of
memory, and it stays at that amount, until i restart visio.

I tried to use GC.Collect(), and setting the
visio.application.undoenabled = false, but neither of them helps with
the memory.

I use VB.Net.

Søren
 
S

sonzos

Hey,

The visio-file is about 15 Mb, and when it is loaded in Visio, it uses
about 200 Mb of ram. When the code iterates the pages without the
export function, it only uses 30-50 Mb of extra ram. So it is the
page.export(filename) function that uses the large amount of ram.

Søren


Mark Nelson [MS] skrev:
 
S

sonzos

Found one error in our program. We were running the whole thing in a
thread. We tried not to, and then we used less ram. But Visio still use
about 1 Gb ram, when it is finish with the export of all pages.

Søren

(e-mail address removed) skrev:
Hey,

The visio-file is about 15 Mb, and when it is loaded in Visio, it uses
about 200 Mb of ram. When the code iterates the pages without the
export function, it only uses 30-50 Mb of extra ram. So it is the
page.export(filename) function that uses the large amount of ram.

Søren


Mark Nelson [MS] skrev:
How much memory does Visio use without exporting the pictures? By thisI
mean that you should comment out the line of code that exports the image but
keep the code that iterates through 160 pages. I'm wondering how different
the memory usage is.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Hey,

Im currently working on a solution, where i need to save each page in a
visio document as a picture.
The problem is the memory, the document is 160 pages.

I use For each to step through all pages of the document, and saves
each page with the page.Export(Filename) function. For each page saved,
visio uses more and more memory. When it is finish, Visio uses 1,9GB of
memory, and it stays at that amount, until i restart visio.

I tried to use GC.Collect(), and setting the
visio.application.undoenabled = false, but neither of them helps with
the memory.

I use VB.Net.

Søren
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top