A lot of factors add to the real time factor you see on Gazebo. Foe example:
- How complex is your model and whether inertial tensor you have used match with the collision you are using in xacro/urdf file
- How many models you have spawned in Gazebo
- How many nodes you are running
- What is the publish rate of those nodes
- Are you using sensors like laser, camera, GPS, etc.
A good remedy can be to run the simulation at the slower than real time. Also try to simplify your model.