Skip to content
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

Sublime freezing at startup #13

Open
matduarte opened this issue Sep 20, 2016 · 27 comments
Open

Sublime freezing at startup #13

matduarte opened this issue Sep 20, 2016 · 27 comments

Comments

@matduarte
Copy link

matduarte commented Sep 20, 2016

Every time on running of ST, JavaScript-Completions checks Node.js version, this cause ST freezing for 4 - 5 seconds.

@pichillilorenzo
Copy link
Owner

I didn't notice it! Maybe because on my computer it takes only ~1 second
This happens because I handle the loading of some files of the plugin in a certain way!
I will try to solve this!

Thanks for the support!

@sofoklesion
Copy link

Hello guys,
I'd like to say Thank you to author of this plugin, great job buddy!
I tried to install plugin in some scenarios (SBT3, portable stable build 3114, Win 7x64):

  • with plugins,
  • fresh SBT portable (no plugins),
  • fresh SBT3 install (no plugins).

Well, there are some issues - I'm not expert on this, so I'll not speculate... you can see my complete log after fresh start, if you are interested.

And once more... Thank you @pichillilorenzo for your hard work!

log.txt

pichillilorenzo added a commit that referenced this issue Sep 21, 2016
pichillilorenzo added a commit that referenced this issue Sep 21, 2016
@pichillilorenzo
Copy link
Owner

@sofoklesion I update it! I was testing it on windows and i was having your same issue. Now it should be ok! Say me if it works!

Wait until Package Control update my url for this new release!

@sofoklesion
Copy link

OK buddy, I will come back to you with updated status after proper upgrade from package control.

@pichillilorenzo
Copy link
Owner

Package Control updated it. You can check now!

@sofoklesion
Copy link

Cool, I'm on it, will be back in couple minutes with result.

@sofoklesion
Copy link

OK, I did two scenarios:

  • upgrade via control package
  • clean install (all rest files in SBT3 cleared)

nodejs problem is gone and seems to be fast proces with no impact to user.
But there is some issue with import _init... you can see my fresh log. (This issue is valid for both scenarios)

Thanks @pichillilorenzo

log-2016-09-22-0011hod.txt

@pichillilorenzo
Copy link
Owner

The "import _init" issue is a false-positive! This happens, like i said before, because I handle the loading of some files of the plugin in a certain way! So it isn't a real issue 👍

However i'm going to update this plugin with some other features!

@sofoklesion
Copy link

Aha... ok, thanks for your work. I'm looking forward to it! Wish you the best... 👍

@pichillilorenzo
Copy link
Owner

pichillilorenzo commented Sep 26, 2016

Hey @matduarte! i found the "issue" that cause ST freezing. My plugin has dependencies with some other my python modules. Sublime Text 3 loads plugin in async way, so i must check and, in case, reload these python modules to make plugin work properly!

@ghost
Copy link

ghost commented Sep 29, 2016

Hi @pichillilorenzo,
I tried to activate your plugin and could see in SBT3 console:

  • "Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js'"
  • Seems path shoud be: "\nodejs\node_modules\npm\bin\npm-cli.js" --> part "\node_modules\npm\bin" is repeating yourself and of course cannot be found.
  • Maybe some troubles with vars definition in node_variables.py?

ENV:

  • portable SBT3-x64, latest stable build, installed on non-system hdd (D:)
  • win 7 x64
  • node 6.6.0

@pichillilorenzo
Copy link
Owner

pichillilorenzo commented Sep 29, 2016

@infobeny
To use npm on windows, you must download and install it on your own from https://nodejs.org/! i can't install locally in automatic way on windows, like I do instead for OSX and Linux, because of some problems about the folder tree depth of npm packages!

In /node/main.py, for windows, i use directly "npm" without the entire path, like I do instead for OSX and Linux, because of the problem i explained.

So have you installed npm on your system??

However I done a test and I used:

  • portable SBT3-x64, latest stable build, installed on USB (D:)
  • win 10 x64
  • node 6.6.0

and the plugin works properly.

Obviously i have npm installed on the system!

In case you could post the whole log file!

@pichillilorenzo
Copy link
Owner

@infobeny try this: http://stackoverflow.com/a/24741740

@ghost
Copy link

ghost commented Sep 29, 2016

Good point @pichillilorenzo. I'm using npm every day and no problem. I checked system path and and except C:\Program Files\nodejs there was extra path C:\Program Files\nodejs\node_modules\npm\bin. When you delete this extra path, there is no problem with your plugin anymore. thx!

@mike-czarnota
Copy link

Hello,
I've got a similar problem :(
Downloaded the newest NodeJS (v7.0.0), changed in settings to use this version, but every time I start ST3 this happens:
TL;DW: goto sec 53
ST3 JS Completions Node problem
it lasts 58 secs, so I recommend to see the url

@pichillilorenzo
Copy link
Owner

@panczarny What is the problem? i didn't understand! Can you post logs from Sublime Text console please??

@mike-czarnota
Copy link

mike-czarnota commented Nov 14, 2016

I think this might be an issue:

Traceback (most recent call last):
File "C:\Users\michal\AppData\Roaming\Sublime Text 3\Packages\JavaScript Completions\node\installer.py", line 117, in checkUpgrade if node_js.getCurrentNodeJSVersion() != nodejs_latest_version :
File "C:\Users\michal\AppData\Roaming\Sublime Text 3\Packages\JavaScript Completions\node\main.py", line 56, in getCurrentNodeJSVersion raise Exception(lines)
Exception: '"C:\Users\michal\AppData\Roaming\Sublime Text 3\Packages\JavaScript Completions\node_binaries\windows-64bit\node.exe"' is not recognized as an internal or external command, operable program or batch file.

But this is weird, because I've got the newest NodeJS version that is available installed...

@tnga
Copy link

tnga commented Jan 20, 2017

most javaScript developers have an experience with nodejs now and have certainly installed it in their computer.

I think it will better to just install the plugin and let it try to use user's installed nodejs instead of automatically try to install local one. An option can be provided for user who don't have a global nodejs installation, to enable automatic download, update and usage of local one. Another option can be provided to disable automatic npm update.

@flawiddsouza
Copy link

Hey, any progress on the issue of sublime text freezing for 4-5 seconds on every load?

@pichillilorenzo
Copy link
Owner

@tnga I install nodejs and npm local because of implementation of plugin features, such as JSDoc or "Evaluate JavaScript".

@flawiddsouza not yet

@pichillilorenzo
Copy link
Owner

The problem is not caused by Node.js but from loading of all the sublime-completions files! I will update it as soon as possible

@pichillilorenzo
Copy link
Owner

@flawiddsouza try the new version about the freezing problem and let me know!

@flawiddsouza
Copy link

The lag is lesser but it hasn't completely disappeared. 2-3 seconds now 😕

@pichillilorenzo
Copy link
Owner

Ok @flawiddsouza! I will check it again, but it is strange because i load my sublime completions in an asynchronous way!

@flawiddsouza
Copy link

Disabling this package removes the lag, so I'm pretty sure the problem is in here somewhere. I'm on a SSD and I still get this. Maybe it's the npm check at startup. Is there anything I give you to help you with this?

@pichillilorenzo
Copy link
Owner

Installing nodejs and/or checking for update with npm is done also in asynchronous way! I will check later if I can solve this! Thanks

@pichillilorenzo pichillilorenzo changed the title Problem with Node.js Sublime freezing at startup Mar 31, 2017
@jeremy447
Copy link

Any news ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants