Home Download Buy Blog Forum Support

pause editor updates while doing heavylifting

pause editor updates while doing heavylifting

Postby valerij_ on Mon Apr 07, 2014 10:46 am

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
Code: Select all
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
valerij_
 
Posts: 41
Joined: Fri Feb 14, 2014 5:59 pm

Re: pause editor updates while doing heavylifting

Postby jbrooksuk on Tue Apr 08, 2014 8:39 am

I think this is a good idea, but... what if other plugins need to update the view?
jbrooksuk
 
Posts: 774
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: pause editor updates while doing heavylifting

Postby valerij_ on Wed Apr 09, 2014 11:51 pm

itl wait till all pauses are resumed or have timed out
valerij_
 
Posts: 41
Joined: Fri Feb 14, 2014 5:59 pm

Re: pause editor updates while doing heavylifting

Postby termnml on Thu May 15, 2014 3:57 pm

Its for the reduction of lag when one plugin is working anyways. I give it a +1. Plz implement such a feature.
termnml
 
Posts: 1
Joined: Thu May 15, 2014 3:53 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 9 guests