[ODE] Trimesh -> other objects performance question...

SJS ode at pulsecode.net
Wed May 11 13:39:53 MST 2005


Well if you WANT to discourage people from asking questions here, a good way
to do it is to answer their questions with "Why are you asking for advice."
Whether or not Vast is an expert on ODE, debug techniques or whatever, his
underlying question didn't seem all that unreasonable.

Vast-- it's not that unusual to see slowdowns when objects are coming to
rest or are closely colliding. The disabled bodies shouldn't be the
problem-- its the ones that are not quite disabled. The slowdown can be
either due to either the collision detection (like the OPCODE part of ODE)
or resolution (e.g. the ODE solver). Collision detection is more difficult
to determine because simple separating planes or bounding volumes don't
provide a quick out and perhaps exact polygon or primitive overlap tests
must be performed. The ODE solver encounters the same kind of problem,
though a bit more obtuse-- the equations require more iterations to solve.

but... as Mr. Watte said, you should probably do some more profiling to find
out where the slowdown is coming from. Even if you don't have VTune, your
own timing code can often be more useful. On Win32 see
'QueryPerformanceCounter' and 'QueryPerformanceFrequency'. Don't use
timeGetTime-- it is very inaccurate for millisecond (and sub-millisecond)
resolutions, which you'll need.

It's almost not worth profiling until you know how fast Release build runs.
Release build should run significantly faster for the CPU part of your code.
Your graphics calls may end up being the bottleneck anyway, in which case
you'll be emailing questions to some other mailing list. :)

As Mr. Watte also said, DO make sure to disable VSync when you're profiling
(in your DirectX device initialization if you're using DirectX), otherwise
your slowdowns may be obscured by graphics waits and you'll get deceiving
results.

SJS

> -----Original Message-----
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Jon
> Watte
> Sent: Wednesday, May 11, 2005 8:45 AM
> To: Vast
> Cc: ode at q12.org
> Subject: RE: [ODE] Trimesh -> other objects performance question...
>
>
>
> > I believe I am doing a debug build all the time (the release
> > build should improve the performance, right?) Yet it still should
> > not be a cause for such a sudden decrease in speed...
>
>
> Why are you asking for advice when you obviously think you know
> better than the people who answer your question? And exactly how
> do you think that this makes it more likely people will answer
> your next question?
>
> You also ignored the (subtle) question that suggested you measure
> what's actually taking the time. Try something like VTune or
> CodeAnalyst. Also make sure your graphics isn't tied to the
> vertical refresh, use a release mode build, and all those other
> standard "benchmarking 101" requirements.
>
> Cheers,
>
> / h+



More information about the ODE mailing list