Glavin001 / atom-preview

:construction: (NO LONGER MAINTAINED) :construction: - :eyeglasses: Ultimate previewer of source code in Atom.
https://atom.io/packages/preview
MIT License
51 stars 23 forks source link

Rederer timeout #116

Open bkmeneguello opened 9 years ago

bkmeneguello commented 9 years ago

I've detected this problem with Jade templates. Whenever i write something like:

- var i = 0
while i < 10
  p ...

In the moment I type the "p" the previewer freezes and closes after while. I know it's a Jade problem and there they aren't working on this. I just thought if atom-preview could have a timeout attribute to kill render processes after delayed time.

Glavin001 commented 9 years ago

It looks like Jade compiles the template synchronously: https://github.com/Glavin001/atom-preview/blob/master/lib/renderer.coffee#L114-L115 So unless Jade library itself supports adding a timeout attribute to kill the render process, we wouldn't be able to step in and do that from Atom Preview.