Slicing machinery makes mesocrystal simulation very slow
|Status:||Backlog||Start date:||03 Apr 2018|
Simulation for MesoCrystal (5 rotations and basis made of FormFactorSphereLogNormalRadius with 10 sub-particles) gets stacked even before Simulation::runComputations.
One thread is busy for several minutes and most of the time is spend inside TruncatedEllipsoid shape calculations.
I have created dedicated functional test in CoreSpecial. To see the problem run
in Qt-creator using "calgrind" debugger. The problem can be decomposed on three parts
- We are cloning too much
For example, FormFactorSpherelogNormal radius is cloned 4000 times.
- We are calculating same vertices again and again
Here Jan's approach with weak+shared pointers to the object with vertices + scaling looks attractive
- It is not possible to disable slicing machinery.
Unfortunately, before the issue resolved, we can't proceed further with meso crystal simulations.