Box2d physics is not running smoothly

In my project based on v 3.6 I use box2d and it’s not running smoothly. Simple physics body that falls on the screen lags (as it clings to screen a little).
And what is the way to create and delete physics bodies during the game without lags?

We’d have to see some code in order to comment, but how are you using Box2D anyway? If you turn off Chipmunk and turn on Box2D then you cannot use PhysicsBody and friends and must talk directly to the Box2D API. Is that a good idea?

I have realized my problem a few days ago. It’s not box2d. It’s internal physics. And lagging was in the engine.
I changed my engine code like in this pull, and now all is working fine.
https://github.com/cocos2d/cocos2d-x/pull/11860

Try to use Box2d in the old standard way. then you will have more control on things that happen in your code .
i never understand why this Box2d wrapper presented by the cocos team in the first place
it just encapsulate to many things .
also it is not strength forward to port code from other languages or open source examples to this Physics wrapper .