What is PhpStorm doing after save?

There are times I work at home. For this I've setup a SSH tunnel to the server at my work. Through this tunnel I can open and edit all my PHP files directly at the webserver. Via the same tunnel I can directly open the website in my browser. Although it is a bit slower than doing my work at the office the speed is more than adequate and the whole system works like a charm.

But some strange thing is happening and I don't know what it is:

  • I've opened a project in PhpStorm, via the SSH tunnel
  • I'm editing a file
  • Then press save
  • Immediatly switch (Alt+Tab) to my browser and hit F5
  • the new changes are visible in less then half a second (wow!)
  • Then I switch back to PhpStorm...
  • ... and it's still busy saving the file?!


During save you can't work in PhpStorm because the windows is locked (not responding). It seems like it is still saving the file, but the server is already updated with the new version, so the upload is definitly finished.

I am wondering what is happening after I press the save button. Maybe some other communication with the server? Is there a way to get this information?

0
8 comments

Hopefully a dev can answer your question as to what it's doing, but in the mean time, It might help you to know that PHPStorm autoSaves whenever it looses the focus.
What this means is you can edit some code, switch to the browser and your changes should be there, without you needing to save at all...

0

> It might help you to know that PHPStorm autoSaves whenever it looses the focus.

Thanks for your message. I already knew about the auto save feature. In fact, I can't live without it anymore :) It took some time to get used to it, but it's actually a very nice feature.

The reason for pressing the save button manually is that this way I'm sure the document is saved exactly at that moment.

0

Opening any non-local files is officially unsupported.
Please use "New project from existing sources" wizard to setup a local copy with autosync to mounted location. Later, always open this local project copy instead of remote one.

0

I know that opening remote files is unsupported, and I'm well aware of the riscs involved.

However, there are times that I want to quickly edit one of those files. And I don't want to go through all the trouble creating a new project and autosync an X amount of MB's just to be able to edit a small set of files (in a large project). I hope you'll understand my situation.

I am not asking you to create something that will magically fix or speed up working with remote files. I know that it's unsupported and I can totally agree with that, I do understand your perspective in the matter. I was just wondering what's going on behind the scenes ater a file has been saved. Some kind of indexing? The GUI reports no activity at that moment.

0

Just in case you haven't voted for http://youtrack.jetbrains.net/issue/WI-1398 :)

0

Its really easy to satisfy your curiosity -
1) Start the CPU profiling (one of last toolbar buttons)
2) Reproduce your scenario, waiting cpu to settle down
3) Stop profiling via same button
4) Open captured profile in YourKit trial. The Hotspots view may be useful, or a drill down a default All-threads-combined one.

0

Thx! And you're right: it's easy to make a snapshot, installing YourKit is no problem either. But then.... :O

It is so much information, I don't know where to start or what to look for. Can you help me in the right direction please?



Attachment(s):
PS-98.145_16.10.2010_18.45.11.zip
0

Definitely no.
This is officially unsupported scenario for current platform incarnation and we wont spent any resource on this now.
You "was just wondering what's going on" and I just gave you a way to satisfy your curiosity.

0

Please sign in to leave a comment.