Linux - OcTree Problem

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
sober
Posts: 21
Joined: Tue Nov 29, 2005 9:23 am

Linux - OcTree Problem

Post 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?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
sober
Posts: 21
Joined: Tue Nov 29, 2005 9:23 am

Post 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
sober
Posts: 21
Joined: Tue Nov 29, 2005 9:23 am

Post 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?
stodge
Posts: 216
Joined: Fri Dec 05, 2003 5:57 pm

Post by stodge »

Profile your application and the Irrlicht library to see what's taking so long.
What does the debugger tell you? You did use the debugger, didn't you?
sober
Posts: 21
Joined: Tue Nov 29, 2005 9:23 am

Post 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
Post Reply