Now when I have my debug drawing working, I see that the reason for the bad performance is invalid calculation of world space bounding boxes. Every tree's bounding box is stretched to the center of the world so that the tree for static bodies do nothing for the speed. I don't use compound shapes for the cones and I place them at their initial locations before adding them to the world.
Edit:
Calling setInterpolationWorldTransform after calling setWorldTransform with the same transformation when placing static bodies solved the bug.
