[Bf-committers] Python + Many Objects = slow!

Chris Want bf-committers@blender.org
Tue, 04 May 2004 15:31:52 -0600


Hi Ken,

This assumes you are compiling with gcc, your
shell is bash, and that you are using Makefiles.

1) make sure you have gprof installed

2) do a 'make clean'

3) do: export NAN_DEBUG='-pg'
If you are using scons you might want to
try replacing all occurences of 'gcc'
in config.opts with 'gcc -pg' ... don't know
if that will work though.

4) type make to build blender

When blender is finishes building it will now
have profiling information.

5) launch blender and run it so that the
feature you want to profile gets executed
more than any other bit of code. In my case,
I would start blender, load my scene, press 'ANIM,
let it run for several frames, pressed escape,
then quit blender immediately. You will now
have a file called gmon.out in your current
directory.

6) do 'gprof /path/to/blender > foo.txt',
replacing path to blender with where your
compiled version of blender is. This
will run for a while and create a file called
foo.txt.

7) Open foo.txt and read it: it is a
detailed report of where blender spent
most of it's time while you were running
it. There is some documentation within the
file on how to read the report.

8) Post any weird stuff to the list ;)

Chris

Kenneth Styrberg wrote:
> [info on profiling snipped ]
> 
>> Hot Doggies!  Someone used actual profiling data rather
>> than guessing at nano-optimizations in the code.  Verrrry
>> interesting.
>>
>>  
>>
> As I'm guilty of trying to do some nano-optimi..., whatever! I'm sort of 
> curious on how you do profiling on the code?
> 
> //styken
> 
> 
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers