Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

4-5 second delay on deployOnSave vs selecting Deploy current file/folder from menu #35

Closed
rshakespear opened this issue Feb 3, 2017 · 4 comments

Comments

@rshakespear
Copy link

I've noticed a significant difference in how fast this extension responds when deployOnSave is set to true, versus simply doing a Ctrl+Alt+F (Deploy current file/folder from menu).

When I either do the keystroke to deploy or select the menu item it nearly instantly proceeds to deploy. However, when I save, it takes 4-5 seconds before I see the deploy script firing. I was using another extension to handle syncing to my remote server, and it worked well, but didn't have some of the nice features as your tool. The one thing it did was push on save very quickly, and I am not struggling to deal with this 4-5 second lag time.

Is there anyway to speed up how fast the deployOnSave feature fires on a save? Are there any settings I need to change/tweak that might help?

Besides a single sftp target, I have the following settings in my settings.json file:
"openOutputOnDeploy": false
"showPopupOnSuccess": false
"showDeployResultInStatusBar": true

Thanks, you've done some good work here!

@unional
Copy link
Contributor

unional commented Feb 4, 2017

I guess this is related to #27 , that each time a new session needs to be created, thus causing that delay.

@mkloubert
Copy link
Owner

@rshakespear

I released 5.20.0 that should reduce the lag noticeable.

The main problem was the needless use of FS.exists(). It checked if the saved file exists, but didn't use the result in next steps, what created the biggest part of those lags, I think.

On the other hand I cleaned up the other code parts in the method, so it should make the use of the deploy on change feature much more comfortable now.

@rshakespear
Copy link
Author

Thanks for being so fast! So, I'm still fairly new to VS Code, and I'm not sure if I'm not doing something right. I have a couple of different windows of VS Code open on different projects/folders. I have updated to 5.20.0 and reloaded (and restarted) both windows, as well as disabled and re-enabled the extension. One of my windows appears to be operating much more quickly - as you said it would, on saving a file. However, the other still appears to have that 4-5 second delay before starting to deploy. Is there something I need, or can do to force it to use the newer version of the code?

@rshakespear
Copy link
Author

I'm going to close the issue. The 5.20.0 change resolved the performance problem for me except for in one project. I'm guessing it is something specific to that one project, with other settings or something like that. I have multiple other projects that the deploy on change performance has been improved significantly on.

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

No branches or pull requests

3 participants