-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving a file in a big project locks up Sublime #37
Comments
Hi Benjamin, thank you for this feedback. I had to use set_timeout previously because some sublime methods are only available from the main thread, but I've done a major code refactoring that should have got rid of those. So please go ahead and create the pull request. |
Hi @bjnortier, should I go ahead with this or wait for your pull request? :) |
When saving a file, "rebar compile" is run with skip_deps=true so that dependencies aren't recompiled. On on_post_save, set_timout is not used as it lock up the GUI thread.
Created. I only changed the set_timeout calls in on_post_save, not the others as I was unsure about them |
Thank you. Will review and merge asap. |
When saving a file, "rebar compile" is run with skip_deps=true so that dependencies aren't recompiled. On on_post_save, set_timout is not used as it lock up the GUI thread.
I have a fairly big project and every time I save a file, Sublime locks up for about 5 seconds. I have traced it to
in sublimerl_completion.py:
https://github.com/ostinelli/SublimErl/blob/master/sublimerl_completion.py#L212
I believe it's because it takes about 5 seconds for rebar to compile the whole project. Interestingly, if I remove the sublime.set_timeout and just call
then it's fine as it's not in the Sublime GUI thread, but I presume that's not thread-safe and set_timeout is used for a reason.
Using skip_deps=true when compiling would help, but it will still lock up the UI for a second or two.
If it could be kept in the separate thread and 'skip_deps=true' it would be great. I can create a pull request.
What is the reason for using set_timeout?
The text was updated successfully, but these errors were encountered: