clemos / haxe-sublime-bundle

Sublime Text bundle for Haxe programming language
Apache License 2.0
235 stars 86 forks source link

Noticeable delay when opening first .hx file #178

Closed Draknek closed 9 years ago

Draknek commented 9 years ago

The first time I open a .hx file, there's a several second delay before the file loads.

I assume this is due to starting the Haxe server? But it could be something else. I tried setting haxe_build_server_mode and haxe_completion_server_mode to false to see if that would help, but it still starts the Haxe server when they're both disabled.

After the first file, everything loads fine, so it's not a big deal. Just a minor annoyance I notice once a day.

dionjwa commented 9 years ago

Yes, it would be great if the documentation was clear where the "haxe_build_server_mode" settings should go (a subdictionary "settings" in the project settings?). And if these options are obsolete, since the build server is always started, even if those are specified as false.

clemos commented 9 years ago

It could also be the time to look for an .hxml file, parse it, look for dependencies, parse dependencies, ... I actually don't believe it's due to the server, because it is usually very fast to start (you can try it in a shell). I also believe haxe_build_server_mode and haxe_completion_server_mode work as intended: if ST is started with both set to false, no server should be started (see https://github.com/clemos/haxe-sublime-bundle/blob/master/HaxeComplete.py#L1387-L1428) Please notice that I still haven't figured how to kill the server when leaving ST, though. Both of these flags can be set in different setting files (globally, per user, per project, etc), as described here: https://www.sublimetext.com/docs/2/settings.html Given the priorities, and since the bundle defines default settings to true, you probably want to set these in your user's Haxe settings. Please let me know if it still fails for you.