cart: empty [ Login ]

DXF Write/Read performance issue

1 
dave_23
10/2/2018 7:41 AM
Hello, I have tried the new version of CadLib (4.0.38.102) and found that writing and reading DXF files is very slow compared to previous version 4.0.38.74. Problems are the DxfWriter.Write() and DxfReader.Read() functions. I tried to measure time on some edited example from the documentation:
C# Code:
DxfModel model = new DxfModel(DxfVersion.Dxf12); // Line. DxfLine line1 = new DxfLine(new Point3D(1d, 2d, 3d), new Point3D(4d, 2.1d, 3d)); model.Entities.Add(line1); for (int i = 0; i < 50000; i++) { line1 = new DxfLine(new Point3D(1d, 2d, 3d), new Point3D(500000d, 10 * i, 3d)); model.Entities.Add(line1); } Stopwatch watch = new Stopwatch(); Console.WriteLine("DxfWriter.Write() model with 50 000 lines:"); watch.Start(); DxfWriter.Write("DxfWriteTest-R12-bin.dxf", model, true); watch.Stop(); Console.WriteLine(watch.Elapsed); Console.WriteLine(); Console.WriteLine("DxfReader.Read() model with 50 000 lines:"); watch.Start(); DxfReader.Read("DxfWriteTest-R12-bin.dxf"); watch.Stop(); Console.WriteLine(watch.Elapsed); // RESULTS: // // WoutWare 4.0.38.74 // ================== // DxfWriter.Write() model with 50 000 lines: // 00:00:00.3303781 // // DxfReader.Read() model with 50 000 lines: // 00:00:00.6923124 // // // WoutWare 4.0.38.102 // =================== // DxfWriter.Write() model with 50 000 lines: // 00:00:12.8001877 // // DxfReader.Read() model with 50 000 lines: // 00:00:27.7090266
Maybe I am doing something wrong? But the previous version is very fast. Any chance you can help? Thanks.
Wout
10/2/2018 7:43 AM
Hi, Can you try the latest version? There was an issue with the obfuscator settings of the new obfuscator we're using. This was about 3-4 weeks ago when I discovered it. - Wout
dave_23
10/2/2018 8:01 AM
Thanks, it looks great! Dave
1