PBD00-93469.7z (4.7 MB)
Using Aspose Diagram .NET, the attached VSD file uses over 5 GB of RAM/memory when opening (compared to under 1GB for MS Visio).
The Diagram has 2 actual pages with 39 background pages.
2 questions:
- Can we load this diagram with less memory usage?
- How can we handle background pages so it is exported to PDF like MS Visio (i.e. 2 non-background pages only)?
Please advise.
Thank you,
Mark
@markmanley.adlib
Thanks for the template file.
After an initial testing, I am able to reproduce the issue as you mentioned by using your template file. I found an issue with the high memory usage when loading vsd.
Please try this sample code:
Aspose.Diagram.Saving.PdfSaveOptions o = new Aspose.Diagram.Saving.PdfSaveOptions();
o.SaveFormat = SaveFileFormat.Pdf;
o.SaveForegroundPagesOnly = true;
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): DIAGRAMNET-53776
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Thank you! If and when the fix is delivered, will there be a notification on this thread?
@markmanley.adlib
Our issue tracking system is not public. However, you can check the status of issue at the bottom of this thread under heading “Issues Status”.
We will be sure to inform you via this forum thread once there is an update available on it.
Thanks.
The issues you have found earlier (filed as DIAGRAMNET-53776) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou
Hi there,
I tried version 25.8, and I see that while much better and processes faster (with SaveForegroundPagesOnly on), it still peaks at a whopping 3.6 GB of memory.
image.png (978 Bytes)
@markmanley.adlib
At present, we have reduced memory consumption by roughly 50%. However, given the differences in algorithms, our performance is not yet on par with Microsoft’s. We will further optimize memory usage in subsequent updates.
In upcoming versions, we will provide an option to enable/disable loading background pages .
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): DIAGRAMNET-53796
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The issues you have found earlier (filed as DIAGRAMNET-53796) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou
@markmanley.adlib
Please try this sample code to set loadfilter:
Aspose.Diagram.LoadOptions lo = new Aspose.Diagram.LoadOptions();
lo.LoadFormat = LoadFileFormat.Vsd;
Aspose.Diagram.LoadFilter f = new Aspose.Diagram.LoadFilter();
f.LoadDataFilterOptions = Aspose.Diagram.LoadDataFilterOptions.ForegroundPage;
lo.LoadFilter = f;
Diagram diagram1 = new Diagram("PBD00-93469.vsd", lo);
Aspose.Diagram.Saving.PdfSaveOptions o = new Aspose.Diagram.Saving.PdfSaveOptions();
o.SaveFormat = SaveFileFormat.Pdf;
o.SaveForegroundPagesOnly = true;
diagram1.Save("out.pdf", o);
Great! It seems to spike to over 1GB of RAM (but not for long), so it is much better and faster.
@markmanley.adlib
Thanks for following the suggested workaround.
Please feel free to contact us in case you have further comments or questions.
Hi there,
One issue has now come up. If I only “load” foreground, then any other diagram with page setup background applied is no longer working.
How can I make both work, or do I have to pick (load all background in case they are used, or load faster)?
Edit: sorry, that file worked (oddly), trying to remove it and add bad one but it is saying limit reached. But question above still stands.
Thanks,
Mark
@markmanley.adlib
Thank you for your feedback.
To make both work,we will attempt to load all foreground pages along with the background pages referenced within them.
Also we will continue working on optimizing memory usage.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): DIAGRAMNET-53817
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
1 Like