View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031137 | Open CASCADE | OCCT:Modeling Data | public | 2019-11-06 23:29 | 2020-12-02 17:12 |
Reporter | kgv | Assigned To | bugmaster | ||
Priority | normal | Severity | integration request | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.5.0 | Fixed in Version | 7.5.0 | ||
Summary | 0031137: Modeling Data, BinTools_ShapeSet - avoid allocation of temporary arrays | ||||
Description | BinTools_ShapeSet allocates temporary arrays while reading triangulation and polygonal data, which looks redundant, although might be not critical from performance point of view. | ||||
Steps To Reproduce | N/A | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
Branch CR31137 has been created by kgv. SHA-1: 2d022b7f07ae71c8479ff68e0b89165052a1275a Detailed log of new commits: Author: kgv Date: Wed Nov 6 19:26:24 2019 +0300 0031137: Modeling Data, BinTools_ShapeSet - avoid allocation of temporary arrays BinTools_ShapeSet now defines maps with proper types instead of Standard_Transient. BinTools_ShapeSet now avoids allocation of temporary arrays while reading triangulation and polygonal data. Classes Poly_Triangle, Poly_PolygonOnTriangulation, Poly_Polygon3D and Poly_Polygon2D have been cleared from .lxx files and extended by new methods for preallocating and filling array, as alternative to passing arrays by copy. wavefront command - export "f" instead of obsolete "fo" keys into file. BinTools - added missing tools for reading/writing short reals. |
|
Patch is ready for review. http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31137-master-KGV The CPU time of XOpen is reduced up-to 9% on manually checked XBF files. |
|
Poly_PolygonOnTriangulation has new method: Standard_EXPORT void SetParameters (const Handle(TColStd_HArray1OfReal)& theParameters); Why not to use the notion like in the method ChangeNodes(), and as it is in Poly_Polygon3D.hxx: TColStd_Array1OfReal& ChangeParameters() const { return myParameters->ChangeArray1(); } I think it is needed to have the same convention on methods in the same family of classes. Also, it is better to have the new constructor of Poly_PolygonOnTriangulation accepting the bool flag theHasParams. Poly_Polygon2D does not have ctor for preallocating array, as alternative to passing array by copy. The new ctors in above classes (if they have two parameters) do not need to be declared explicit. BinTools_ShapeSet does not define the map with proper type instead of Standard_Transient for myPolygons2D. |
|
> BinTools_ShapeSet does not define the map with proper type instead of Standard_Transient for myPolygons2D. In fact, class fills in myPolygons2D but doesn't use it in any way. This is why I have decided not to change this map definition. |
|
> Why not to use the notion like in the method ChangeNodes(), and as it is in Poly_Polygon3D.hxx: I can add Boolean flag for consistency, but SetParameters() will be still needed. This is because BinTools_ShapeSet writing hasParameters flag in unfortunate place, unlike other collections. |
|
Branch CR31137 has been updated by kgv. SHA-1: 0661576c86dd0466268053132fbdc3a521167ce7 Detailed log of new commits: Author: kgv Date: Fri Nov 8 12:41:12 2019 +0300 # remarks |
|
Branch CR31137 has been updated forcibly by kgv. SHA-1: 02d98729ec0f43853015fce66e9950288fd1dc1a |
|
Branch CR31137 has been updated forcibly by kgv. SHA-1: bc639e2c8f9fbaac96966010abfe2b20c2fcad50 |
|
Remarks have been pushed to branch. |
|
The new ctor of Poly_Polygon2D is better to declare explicit. |
|
Branch CR31137 has been updated by kgv. SHA-1: df262840050b365d338d976b16cb91f0ebfc04c7 Detailed log of new commits: Author: kgv Date: Fri Nov 8 14:55:53 2019 +0300 # remarks 2 |
|
> The new ctor of Poly_Polygon2D is better to declare explicit. Fixed. |
|
Reviewed. |
|
Branch CR31137_1 has been created by kgv. SHA-1: 23332b6f9c937a0a0d82030e26879bef90eb23ce Detailed log of new commits: Author: kgv Date: Wed Nov 6 19:26:24 2019 +0300 0031137: Modeling Data, BinTools_ShapeSet - avoid allocation of temporary arrays BinTools_ShapeSet now defines maps with proper types instead of Standard_Transient. BinTools_ShapeSet now avoids allocation of temporary arrays while reading triangulation and polygonal data. Classes Poly_Triangle, Poly_PolygonOnTriangulation, Poly_Polygon3D and Poly_Polygon2D have been cleared from .lxx files and extended by new methods for preallocating and filling array, as alternative to passing arrays by copy. wavefront command - export "f" instead of obsolete "fo" keys into file. BinTools - added missing tools for reading/writing short reals. |
|
Branch CR31137_1 has been deleted by inv. SHA-1: 23332b6f9c937a0a0d82030e26879bef90eb23ce |
|
Branch CR31137 has been deleted by inv. SHA-1: df262840050b365d338d976b16cb91f0ebfc04c7 |
occt: master 6b467e52 2019-11-06 16:26:24 Committer: bugmaster Details Diff |
0031137: Modeling Data, BinTools_ShapeSet - avoid allocation of temporary arrays BinTools_ShapeSet now defines maps with proper types instead of Standard_Transient. BinTools_ShapeSet now avoids allocation of temporary arrays while reading triangulation and polygonal data. Classes Poly_Triangle, Poly_PolygonOnTriangulation, Poly_Polygon3D and Poly_Polygon2D have been cleared from .lxx files and extended by new methods for preallocating and filling array, as alternative to passing arrays by copy. wavefront command - export "f" instead of obsolete "fo" keys into file. BinTools - added missing tools for reading/writing short reals. |
Affected Issues 0031137 |
|
mod - src/BinTools/BinTools.cxx | Diff File | ||
mod - src/BinTools/BinTools.hxx | Diff File | ||
mod - src/BinTools/BinTools_ShapeSet.cxx | Diff File | ||
mod - src/BinTools/BinTools_ShapeSet.hxx | Diff File | ||
mod - src/MeshTest/MeshTest.cxx | Diff File | ||
mod - src/Poly/FILES | Diff File | ||
mod - src/Poly/Poly_Polygon2D.cxx | Diff File | ||
mod - src/Poly/Poly_Polygon2D.hxx | Diff File | ||
rm - src/Poly/Poly_Polygon2D.lxx | Diff File | ||
mod - src/Poly/Poly_Polygon3D.cxx | Diff File | ||
mod - src/Poly/Poly_Polygon3D.hxx | Diff File | ||
rm - src/Poly/Poly_Polygon3D.lxx | Diff File | ||
mod - src/Poly/Poly_PolygonOnTriangulation.cxx | Diff File | ||
mod - src/Poly/Poly_PolygonOnTriangulation.hxx | Diff File | ||
rm - src/Poly/Poly_PolygonOnTriangulation.lxx | Diff File | ||
rm - src/Poly/Poly_Triangle.cxx | Diff File | ||
mod - src/Poly/Poly_Triangle.hxx | Diff File | ||
rm - src/Poly/Poly_Triangle.lxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-11-06 23:29 | kgv | New Issue | |
2019-11-06 23:29 | kgv | Assigned To | => msv |
2019-11-06 23:44 | git | Note Added: 0088757 | |
2019-11-07 08:02 | kgv | Note Added: 0088761 | |
2019-11-07 08:02 | kgv | Status | new => resolved |
2019-11-07 08:02 | kgv | Steps to Reproduce Updated | |
2019-11-07 08:03 | kgv | Note Edited: 0088761 | |
2019-11-07 11:25 | kgv | Relationship added | related to 0031136 |
2019-11-08 11:49 |
|
Note Added: 0088789 | |
2019-11-08 11:49 |
|
Assigned To | msv => kgv |
2019-11-08 11:49 |
|
Status | resolved => assigned |
2019-11-08 12:15 | kgv | Note Added: 0088790 | |
2019-11-08 12:31 | kgv | Note Added: 0088791 | |
2019-11-08 12:42 | git | Note Added: 0088792 | |
2019-11-08 12:46 | git | Note Added: 0088793 | |
2019-11-08 12:48 | git | Note Added: 0088794 | |
2019-11-08 12:49 | kgv | Note Added: 0088795 | |
2019-11-08 12:49 | kgv | Assigned To | kgv => msv |
2019-11-08 12:49 | kgv | Status | assigned => resolved |
2019-11-08 14:40 |
|
Note Added: 0088801 | |
2019-11-08 14:40 |
|
Assigned To | msv => kgv |
2019-11-08 14:40 |
|
Status | resolved => assigned |
2019-11-08 14:57 | git | Note Added: 0088802 | |
2019-11-08 14:57 | kgv | Note Added: 0088803 | |
2019-11-08 14:57 | kgv | Assigned To | kgv => msv |
2019-11-08 14:57 | kgv | Status | assigned => resolved |
2019-11-08 15:07 |
|
Note Added: 0088804 | |
2019-11-08 15:07 |
|
Assigned To | msv => bugmaster |
2019-11-08 15:07 |
|
Status | resolved => reviewed |
2019-11-09 13:50 | git | Note Added: 0088823 | |
2019-11-10 11:18 | bugmaster | Changeset attached | => occt master 6b467e52 |
2019-11-10 11:18 | bugmaster | Status | reviewed => verified |
2019-11-10 11:18 | bugmaster | Resolution | open => fixed |
2019-11-10 11:41 | git | Note Added: 0088830 | |
2019-11-10 11:41 | git | Note Added: 0088831 | |
2020-12-02 16:22 |
|
Fixed in Version | => 7.5.0 |
2020-12-02 17:12 |
|
Status | verified => closed |