microsoft / TypeScript-Sublime-Plugin

IO wrapper around TypeScript language services, allowing for easy consumption by editor plugins
Apache License 2.0
1.72k stars 235 forks source link

On Sublime Text 2 PC, we get a dialog that the language service is taking longer than usual #13

Open fionafung opened 9 years ago

fionafung commented 9 years ago
  1. On a PC with SublimeText 2 installed, install the TypeScript plugin
  2. Ping FionaF for her repro project
  3. Open up cat.ts in Sublime
  4. Open up dog.ts in Sublime

You will see the dialog below. After you dismiss the dialog, the language service does work.

pluginmessage

fionafung commented 9 years ago

As of a pull request from Master at 02/18/2015, 11:40am, this still repros

steveluc commented 9 years ago

Does not repro on my box with cat.ts and dog.ts from other issue. Can you send me a zip?

steveluc commented 9 years ago

This is the same as #49. The cause is that, since ST2 does not call plugin_loaded() (as it does in ST3), we use the first on_activation event to spawn the server and set up the queues for it. Will look into doing this on another thread to avoid the message.

fionafung commented 9 years ago

FYI sunk to tip on 03/28, 9:00am, I still get this message on ST2. slowwarningmessage

zhengbli commented 9 years ago

Does this issue still exist?

steveluc commented 9 years ago

I still see it once in a while. The problem is that Sublime Text 2 doesn't call plugin_loaded and so we call it on the first on_activated event. plugin_loaded can take up to a half second or so because it is starting the server process. It is not simple to fix because it would require a way to queue work until the server process is started.

zhengbli commented 9 years ago

I haven't seen this notice for a while after recent the refactor.

billti commented 9 years ago

I was still seeing it often yesterday testing the refactor work, so it is still there even after the refactor.

hoanhtien commented 9 years ago

One way to consistently repro this issue is:

  1. Restart Sublime
  2. Drag & drop a bunch of large ts files into Sublime.