- Step 1
adding the engine code directly in to my code
completed
- Step 2 bench mark
- Duration 30 minutes
- Frames rendered 12
- Average FP minute 12/30= 0.4 (faster at the begining slower at the end) ... observation very low fps 0.0..
Results
1. irr::scenemanager:CsceneManager::drawAll
-Total Time 389.430.194
-seltime 8.789
-calls 26
- 99.3% spend time in ISceneNode::OnPreRender
//My particles are child of some scene nodes so in ISceneNode::OnPreRender it's calling CParticleSystemSceneNode::OnPreRender
//in CParticleSystemSceneNode::OnPreRender the doParticleSystem is 100% using the time
//but in doParticleSystem the time is used 97.9% by the erase
//irr::core::array<irr::scene::Sparticle>::erase
// going in this function
- Total Time 378.340.796
- Self time 44.585.694
- Calls 110.800
- operator = contribution 88.2% (= irr::scene::SParticle)
- total time 334.471.897
- self time 182.642.351
- Calls 99.802.384
-operator = contribution 45.4% in op (= irr::scene::SParticle) (= irr::core::vector3d<float>)
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Concluzions:
- DoParticleSystem waz called 201 times
- erase was called 110.800 times
- operator =(Sparticle) was called 99.802.384
- operator =(vector3d) was called 299.913.267 times
The big diference in calls is from erase and =(Sparticle)
in the erase code is this observation
//! Erases an element from the array. May be slow, because all elements
//! following after the erased element have to be copied.
I belive that will be morefaster if the the particle system will use an List and the moving of the rest of particles when you eliminate one prticle will not be necesare
+ if i have the ocazion to say
-the bug with the orientation op particles when they are child of an object and the parent move
http://irrlicht.sourceforge.net/phpBB2/ ... icle#11000
http://irrlicht.sourceforge.net/phpBB2/ ... icle#12796
http://irrlicht.sourceforge.net/phpBB2/ ... icle#26646
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=4525 plz repair the orientation to be automaticly done
I belive that should be 2 types of particles: 1 particle witch go in the direction of the emitor(particle sword ... etc) and particle system in what every particle have his own direction independent of the emitor(trails)