Official forum for the Chipmunk2D Physics Library.


Postby bram » Thu Jul 23, 2015 6:18 pm


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?



Posts: 25
Joined: Sun May 24, 2009 11:04 pm

Re: MarkSubtree

Postby Amral » Sat Sep 26, 2015 3:28 pm

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.
Posts: 5
Joined: Fri Oct 24, 2014 11:11 am

Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 1 guest