Fracture generation extremely slow in debug
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 287
- Forks
- 109
- Avg merge
- 4d 41m
- Merged PRs (30d)
- 5
Description
For example, inputFiles/proppant/ProppantSlotTest_smoke.xml takes multiple minutes for the SurfaceGenerator step.
In particular, most of the time is spent in this code:
https://github.com/GEOSX/GEOSX/blob/be3936d8cbc59ad42a8896d074369490e2864d47/src/coreComponents/mesh/SurfaceElementRegion.cpp#L195-L208
Questions:
- Why does it need to loop over the entire
faceMap, when indices of faces/element that have just been added are available in the function for free? Can't we jut check them against all sets? - Does
SortedArrayreally need to checkisSortedprecondition on every call tofindhere ? This also takes a crap load of time.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with inputFiles/proppant/ProppantSlotTest_smoke.xml and profile the SurfaceGenerator step, then inspect src/coreComponents/mesh/SurfaceElementRegion.cpp lines 195-208. Review the linked SortedArray::find implementation in sortedArrayManipulation.hpp, determine whether these scans and sortedness checks dominate debug time, and validate any improvement against the same smoke test without changing fracture-generation behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100