Are you using Dyntopo or Multires to sculpt ?
Dyntopo has an undo code that is unique to it, and when your dyntopo sculpt start to be high poly, the dyntopo undo takes a very long time to do its work unfortunately.
If the problem you observed is in Multires i have no idea sorry.