MarkSubtree

Official forum for the Chipmunk2D Physics Library.
Post Reply
bram
Posts: 25
Joined: Sun May 24, 2009 11:04 pm
Contact:

MarkSubtree

Post by bram »

cpHello(),

In my profile run, I see the function MarkSubtree() show up prominently, accounting for approximately half the cycles of the cpSpaceStep function.

Is this expected, or am I using Chipmunk2D sub optimally?
I have many circle shapes and segment shapes in my world. (thousands)

Is it a signal that I should be looking into cpSpaceUseSpatialHash() which I currently not use?

Image

Thanks!

Bram
Amral
Posts: 5
Joined: Fri Oct 24, 2014 11:11 am
Contact:

Re: MarkSubtree

Post by Amral »

Hi Bram, have you tried switching to the spatial hash (it only takes one line of code) - what are the results then?

In the project I'm working on, I found I simply had too many objects in the space, as far as I could tell, so had to work on reducing that count.
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests