Page 1 of 1

Linux - OcTree Problem

Posted: Tue Nov 28, 2006 7:44 am
by sober
I am having a mesh ([url=http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=17286]here is the thread[/quote]) and ) I generate a OcTreeSceneNode out of it.

When I use windows this takes around 1-2 seconds. I am using gcc under windows. When I boot Linux and recompile the code there (same PC again gcc) the generation of the OcTree takes 21 Seconds.

Does anyone has an Idea, what can cause this differences?

Posted: Tue Nov 28, 2006 8:31 am
by hybrid
Probably different compiler settings. Linux compiles a debug version without optimization by default, while the windows version has it the other way round.

Posted: Tue Nov 28, 2006 9:46 am
by sober
well, I will use -O2 or -O3 than, when I am home again and look if I will get faster results.
thanks for the hint

Posted: Tue Nov 28, 2006 5:08 pm
by sober
I am using Code::Blocks both in Linux and Windows.
Both are compiling the Source in Release mode with -s -O3 -fexpensive-optimizations

Still: ~2 seconds for OcTree on Windows, ~20 seconds on linux =(

Code: Select all

Needed 22999ms to create OctTree SceneNode.(1274 nodes, 47433 polys)
As there are some more linuxusers around here, perhaps someone can give me a hint?

Posted: Tue Nov 28, 2006 5:29 pm
by stodge
Profile your application and the Irrlicht library to see what's taking so long.

Posted: Tue Nov 28, 2006 7:13 pm
by sober
Uh...

In profilemode: 33 seconds in:

Code: Select all

irr::core::array<unsigned short, irr::core::irrAllocator<unsigned short> >::erase(unsigned int, int)
next ist 7seconds:

Code: Select all

irr::core::irrAllocator<unsigned short>::construct(unsigned short*, unsigned short const&)
As far as I understand, the arraystuff takes place in the octtreenode