I guess, offscreen bodies are still in memory and in box2d calculations if that what you meant. There is no performance optimization there, you'll need to implement something on your own, which deactivates and reactivates bodies, when they are out of screen and coming back.
I'm not sure right now, but I guess that "invisible" (hopefully also off the screen) textures are handled differently, in a more efficient way, but this statement needs a confirmation from @atilim.
There was a topic ("Moving screen in Box2d world") and a comment by Atilim on March 28 :
On the other hand, rendering a much larger world than the screen will have performance issues. Currently the only way is dividing the world into some pieces (e.g. about the size of the screen) and adding only the visible parts.
I know this can be really complicated but we're also working on efficient culling of off-screen sprites.
Comments
There is no performance optimization there, you'll need to implement something on your own, which deactivates and reactivates bodies, when they are out of screen and coming back.
I'm not sure right now, but I guess that "invisible" (hopefully also off the screen) textures are handled differently, in a more efficient way, but this statement needs a confirmation from @atilim.