Sublime Forum

Pause editor updates while doing heavylifting

#1

it would be nice if a plugin author could say ‘sublime, please dont redraw the buffer, im doing a lot of small changes, ill tell you when im done’. effectivly something like requestAnimationFrame in HTML/JS world.

i think a view.pauseRedraw() and view.resumeRedraw() would be better than one function accepting a callback, as we dont need more asynch dataflow and

try:
    view.pauseRedraw();
    #something causing a lot of redraws, eg appending some text after every letter or whatever
except:
   pass
finally:
   view.resumeRedraw()

is quite neat

0 Likes

#2

I think this is a good idea, but… what if other plugins need to update the view?

0 Likes

#3

itl wait till all pauses are resumed or have timed out

0 Likes

#4

Its for the reduction of lag when one plugin is working anyways. I give it a +1. Plz implement such a feature.

0 Likes