I’m wondering if there are some ways to improve the general conversion speed in GroupDocs.Viewer (21.8) for DWG files in particular.
The attached file for example takes over 10 seconds on my system to convert. K03.10289.101.1_REV4.dwg.zip (3.4 MB)
As we want to use GroupDocs.Viewer as a live-viewer, we want to keep our customer’s waiting time to a minimum.
Are there any options or ways to improve the conversion time, even if they sacrifice quality?
Generally and specific to DWG files?
Thank you for attaching the sample file. I’ve got similar results to yours when it was a cold start, all subsequent conversions took 6-7 seconds on my system.
When talking about CAD drawings the conversion time depends on count of entities a drawing has but the moment we do not provide any options that may improve CAD files conversion time but we’ll investigate such possibility in VIEWERNET-3561.
Thank you for the quick reply.
I just re-tested it with a console program release build, as I was previously testing in debug mode.
But I have to say it was still taking 10-11 seconds, even when converting the file a second time. (Creating a 2nd Viewer instance)
I’m wondering what you are doing differently?
I’m sorry for the delayed response. I’ve been using sample_app.zip (3.4 MB) to run the conversion in a loop. Here is results that I’ve got when running the app that targeting .NET Framework 4.8
I also noticed, that using the same file in all runs, “improves” performance as well.
When I was loading a different DWG as “warm up”, it did not improve the performance as much.
Those were my first values inside the loop, after loading a different file before the loop:
So between 5.5 and 9.1 seconds is quite a difference.
And this only happens with .NET Framework, not with .NET Core as it seems.
Is this something you will be able to fix, or should we attempt to move our project to .NET Core? GroupDocsViewerSpeed.zip (3.5 MB)
We’ll take a look at what we can do from our side to improve conversion speed. What about .NET Core and .NET - I would definitely give it a try due to a number of performance improvements that has been introduced in .NET Core and .NET.
Thank you for the feedback and suggestion
I’ll keep testing if .NET Core will be a general improvement or if the time difference was just specific to that file.
If it really speeds up conversion time in general I’ll attempt to move our project to .NET Core as suggested.
In GroupDocs.Viewer for .NET 24.2 we have added new feature that improves conversion speed for CAD drawings. Set EnablePerformanceConversionMode to true to improve conversion performance:
using (Viewer viewer = new Viewer("input.dwg"))
{
HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources("Output-Page#{0}.html");
viewOptions.CadOptions = CadOptions.ForRenderingByWidth(1000);
viewOptions.CadOptions.EnablePerformanceConversionMode = true;
viewer.View(viewOptions);
}