Some VPython operations are slower in Jupyter than Classic because much of Classic was written in C++ whereas Jupyter VPython is implemented in Python (though the vector class has been Cythonized). However, a separate issue is that it's costly to send lots of data from the Python program to the notebook, so I recommend getting rid of trail1 and trail1.append, because you're sending data in every loop iteration. Instead, say obj1 = sphere(pos=vector(5e12,0,0), radius=5e11, make_trail=True). Then points will be added to the trail on the notebook side, without having to send anything to the notebook. You might also consider in the obj1 constructor setting interval to something other than the default value of 1.
A similar issue exists for updating obj1.pos in every loop iteration. You're sending 1000 obj1.pos updates every second through the relatively narrow pipe that runs from the server to the browser. Consider updating a variable "pos" in every iteration but updating obj1.pos only every 50 iterations, say.