occt: master e1c1b6b9
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
master | 2016-05-04 01:12:28 | master f02e43eb | ||
Changeset | 0027490: BRepMesh: Reduce number of memory allocations 1) Reduce the number of calls to malloc by grouping requests to larger blocks. To achieve this goal, the following ways are used: - Containers of types sequence, list and map are initialized with an instance of NCollection_IncAllocator, at this taking care of the time of life of allocated objects, so that not to occupy huge amount of memory. - Allocation of several arrays having the same and short life time is changed so that to allocate a buffer array of necessary size and to place arrays in this buffer. 2) In BRepMesh_FastDiscretFace, optimize the function filterParameters so that to avoid excess memory allocations. 3) In NCollection_CellFilter, change declaration of the method Reset to accept array by reference rather than by value. 4) Add Allocator() method in map, sequence and vector collection classes by analogy with list collection. 5) Correct the size of block for IncAllocator for x64 platform. In order free-ed block to be returned to the system its size should be at least 1024K on x64 and 512K on x86. This allows to retain free virtual space almost to the state before algorithm run. 6) Decrease amount of memory zeroed by calloc. For that, reduce theIncrement parameter of the embedded vectors of the classes NCollection_UBTreeFiller and BRepMesh_VertexInspector to default value 256. 7) Avoid computing bounding box when not necessary (if no relative deflection is used) 8) Cycles by wires of face using TopExp_Explorer are converted to use TopoDS_Iterator instead. 9) BRepMesh_FastDiscret::Add optimized to avoid storing sequences of faces and edges 10) The tests "mesh standard_* W7" are corrected to accept the new behavior. Earlier the following error took place: Not connected mesh inside face 9 {12 13} Now this error was replaced with another one: free nodes (in pairs: face / node): {9 12} Actually it is not a regression, rather improvement, if we look at the snapshot. 11) Change other test cases to their actual state. |
|||
mod - src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx | Diff File | |||
mod - src/BRepLib/BRepLib.cxx | Diff File | |||
mod - src/BRepMesh/BRepMesh.hxx | Diff File | |||
mod - src/BRepMesh/BRepMesh_DataStructureOfDelaun.cxx | Diff File | |||
mod - src/BRepMesh/BRepMesh_Delaun.cxx | Diff File | |||
mod - src/BRepMesh/BRepMesh_FaceAttribute.cxx | Diff File | |||
mod - src/BRepMesh/BRepMesh_FastDiscret.cxx | Diff File | |||
mod - src/BRepMesh/BRepMesh_FastDiscretFace.cxx | Diff File | |||
mod - src/BRepMesh/BRepMesh_FastDiscretFace.hxx | Diff File | |||
mod - src/BRepMesh/BRepMesh_IncrementalMesh.cxx | Diff File | |||
mod - src/BRepMesh/BRepMesh_VertexInspector.hxx | Diff File | |||
mod - src/BRepMesh/BRepMesh_VertexTool.cxx | Diff File | |||
mod - src/BRepMesh/BRepMesh_VertexTool.hxx | Diff File | |||
mod - src/BRepMesh/BRepMesh_WireChecker.cxx | Diff File | |||
mod - src/GeomAdaptor/GeomAdaptor_Curve.cxx | Diff File | |||
mod - src/NCollection/NCollection_BaseMap.hxx | Diff File | |||
mod - src/NCollection/NCollection_BaseSequence.hxx | Diff File | |||
mod - src/NCollection/NCollection_BaseVector.hxx | Diff File | |||
mod - src/NCollection/NCollection_CellFilter.hxx | Diff File | |||
mod - src/NCollection/NCollection_UBTreeFiller.hxx | Diff File | |||
mod - tests/bugs/iges/buc60820_2 | Diff File | |||
mod - tests/bugs/iges/buc60823 | Diff File | |||
mod - tests/bugs/iges/bug306 | Diff File | |||
mod - tests/bugs/modalg_2/bug358 | Diff File | |||
mod - tests/bugs/vis/bug288_5 | Diff File | |||
mod - tests/mesh/data/standard/W7 | Diff File |