Need a faster way to loop all frames and set keyframing data on properties?
No need to change frame.

keyframe_insert(data_path, index=-1, frame=bpy.context.scene.frame_current, group="")


  frame (float) – The frame on which the keyframe is inserted,
  defaulting to the current frame.
  .


Remove the frame set (which also AFAIK updates scene) and set the frame implicitly.

ob.keyframe_insert(data_path='["%s"]' % shapeName, frame=i)