Remove Unlimited Undo to Decrease Interface Lag
I've noticed that the interface begins to lag when I've been drawing on the same file for a while (I use an iPad pro with an Apple Pencil 2). It lags in at least three ways:
- Drawing new lines
- Erasing lines
- Scrolling up and down in the file
I can eliminate the lag completely if I close the file and re-open it. Also, of course, after closing the file and re-opening it I can't undo any of the previous strokes. Thus, it's reasonable to expect that the reason for the lag is because of appending strokes to some data structure in the background without limit, and after drawing on the file for a while it spends too much time modifying the data structure.
If this is actually the reason, the cure is simple: remove unlimited undo! Just put a limit on how many steps you can undo with pen strokes (like 100 or something, I would never hit the undo button more than 10 times anyway).
-
Omar AlSuwaidi commented
That's a very good observation. I believe your speculation is spot on. Closing the app completely does "fix" it, but some optimization techniques like the ones you mentioned are definitely the better solution.