Skip to content

Modeling Algorithms - CPU performance optimizations for Draw display and Bop#1098

Draft
dpasukhi wants to merge 1 commit intoOpen-Cascade-SAS:IRfrom
dpasukhi:opt_iterations_bp
Draft

Modeling Algorithms - CPU performance optimizations for Draw display and Bop#1098
dpasukhi wants to merge 1 commit intoOpen-Cascade-SAS:IRfrom
dpasukhi:opt_iterations_bp

Conversation

@dpasukhi
Copy link
Copy Markdown
Member

Draw segment batching: replace fixed-size Draw_XSegment[1000] array with std::vector to eliminate forced flushes every 1000 segments. Add constructor to Draw_XSegment for in-place construction via emplace_back. Remove dead #else code path in DrawTo.

Boolean IsClosedFF caching: pre-compute edge closedness per face into NCollection_DataMap before the 4-level nested edge loop in BOPAlgo_PaveFiller::PerformFF, reducing O(N1*N2) calls to O(N1+N2) pre-computation with O(1) lookups.

Boolean IsInside edge bounds caching: pre-compute TopExp::MapShapes edge maps per solid in BOPAlgo_BuilderSolid::PerformAreas before the hole-matching loop, avoiding redundant topology traversal when the same solid is checked against multiple hole shells.

…and Boolean operations

Draw segment batching: replace fixed-size `Draw_XSegment[1000]` array
with `std::vector` to eliminate forced flushes every 1000 segments.
Add constructor to `Draw_XSegment` for in-place construction via
`emplace_back`. Remove dead `#else` code path in `DrawTo`.

Boolean IsClosedFF caching: pre-compute edge closedness per face into
`NCollection_DataMap` before the 4-level nested edge loop in
`BOPAlgo_PaveFiller::PerformFF`, reducing O(N1*N2) calls to
O(N1+N2) pre-computation with O(1) lookups.

Boolean IsInside edge bounds caching: pre-compute `TopExp::MapShapes`
edge maps per solid in `BOPAlgo_BuilderSolid::PerformAreas` before
the hole-matching loop, avoiding redundant topology traversal when
the same solid is checked against multiple hole shells.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant