[sldev] Profiling and optimization

Dirk Moerenhout blakar at gmail.com
Tue Jul 10 10:33:26 PDT 2007


For now I use rather basic scenarios where I render a specific scene
to see how different environments impact performance. This is off
course perfectly reproducable by logging in and out at the same spot.
The beta grid is ideal as there's really noone there.

The tough part will come when I try to have a go at profiling complex
scenarios where there are many avatars in view. This is never
perfectly reproducable.

Upto now most of the optimisations I've tested were easy because by
looking at the assembly alone it were clear winners (for example
preparing to call addTextureStats used to be about as complex as the
inlined code is by itself).

What is very important is that people must never forget that they need
to profile the most suitable executable. The debug info needs to be
present but besides that you need all the optimisations you get in a
real build. If you don't do that you end up seeing hotspots that are
auto-eliminated by the compiler.

Also important is to make sure you're running clean. Don't leave
browser windows open cause while running the viewer you may end up
seeing drops in fps because something else is chewing your cycles. I
had it once when I forgot to close a page that was using flash.

You also need to keep the focus on the viewer window so that it tries
to perform at its best.

Personally it feels like I've only just begun so my tips are limited
for now. I'll come up with more as I proceed. Most important thing for
that page would be to rewrite it in third person so it's easier to
contribute to it :)

Dirk aka Blakar Ogre

On 7/10/07, Soft Linden <soft at lindenlab.com> wrote:
> Blakar, did you end up going with AMD CodeAnalyst? Do you have any
> approach to creating a reproducible workload for benchmarking viewer
> changes?
>
> I know optimization's kind of a sexy subject, but it's also easy to
> misinterpret the tools and focus on the wrong areas without a good
> profiling approach. It looks like you're off to a good start and maybe
> trending toward bigger things... can you think of anything you've
> found so far that could be added to Douglas' profiling guide?
>
> https://wiki.secondlife.com/wiki/Profiling_and_Optimization
>
>
> On 6/23/07, Dirk Moerenhout <blakar at gmail.com> wrote:
> > I haven't used it as I don't plan to pay for a profiler. I'm recently
> > downloaded AMD's CodeAnalyst as it's the only free alternative for
> > windows I know off. It works pretty well but I haven't managed to get
> > the call stack sampling to work which I'd like to have.
> >
> > It does properly show you function names and can do drilldown to code
> > and such. I did have an issue getting it to work with the ForDownload
> > pdb but I figured out that compiling only viewer.cpp with /ZI is
> > enough to have it working again.
> >
> > Dirk aka Blakar Ogre
> >
> > On 6/23/07, Nicholaz Beresford <nicholaz at blueflash.cc> wrote:
> > >
> > > Did anyone try GlowCode on Windows?  I ordered
> > > an Eval and tried it with their demo app, but
> > > it doesn't seem to show any function calls
> > > (just a thread list) for any of the SecondLife
> > > builds (either debug, NoOpt or ForDownload).
> > >
> > >
> > > Nick
> > >
> > >
> > >
> > > Second Life from the inside out:
> > > http://nicholaz-beresford.blogspot.com/
> > >
> > >
> > > Douglas Soo wrote:
> > > > After watching the chatter fly on this list, I thought that it might be
> > > > worthwhile to write up a short summary of what we have found at Linden
> > > > to be effective approaches to profiling and optimizing code.
> > > >
> > > > <https://wiki.secondlife.com/wiki/Profiling_and_Optimization>
> > > >
> > > > It's pretty thing, but hopefully will be useful.
> > > >
> > > > - Doug
> > > >
> > > >
> > > > ------------------------------------------------------------------------
> > > >
> > > > _______________________________________________
> > > > Click here to unsubscribe or manage your list subscription:
> > > > /index.html
> > > _______________________________________________
> > > Click here to unsubscribe or manage your list subscription:
> > > /index.html
> > >
> > _______________________________________________
> > Click here to unsubscribe or manage your list subscription:
> > /index.html
> >
>


More information about the SLDev mailing list