That is not supposed to be the case. The time it takes to undo something is depending on what it is you are undoing. If it is something complex it naturally takes longer than some small thing. Either way, undoing should never take longer that a very short moment.
If you found it to be slower than say, a second, please let me know and please describe what specifically you are doing in Animation Paper, so we can reproduce the behaviour you are talking about.
So I discovered that its not the amount of frames its the amount of things on the frame. A blank frame with like a persons head would not be laggy but with a whole person it would take like thirty seconds or more to undo.