ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
803 stars 54 forks source link

Taking too long in `on_deactivated` #21

Closed ForbesLindesay closed 10 years ago

ForbesLindesay commented 11 years ago

I've just tried installing this and I keep getting an error that say:

A plugin (tern) may be making Sublime Text unresponsive by taking too long (1s) in its on_deactivated callback

Is there any way the work done in that function could be made asynchronous so as to prevent this problem?

marijnh commented 11 years ago

I assume this is ST version 3? I've been told that the API in version 3 (but not 2) allows asynchronous work, and since the 'work' done on the Python side is simply blocking on a pipe, not real work, it probably doesn't require any invasive changes, but I found the API docs for ST3 to be so minimal and confusing that I didn't manage to figure out how this is supposed to be done.

If you have ideas or more information, let me know.

ForbesLindesay commented 11 years ago

I've found it intolerably slow on both ST2 and ST3 (although it works in both). Sadly I know very little python and even less sublime text API but it's encouraging to hear that ST3 has the option for asynchronous plugins.

DerZyklop commented 10 years ago

same here, but with on_post_save

marijnh commented 10 years ago

@DerZyklop This tern plugin does not register an on_post_save handler.