I was using it for longer sessions to edit files on my remote Linux node and I noticed that its memory usage was creeping up slowly. In the span of 4 hours more than 500 of these processes spawned and was kept around for as long as vscode was open. These were eating up around 2 GB of my node's RAM by the time I noticed:
I looked around a bit in the extension source - I see that ssh connections are cached in the SshConnectionManager but on each SFTP command a new SFTP session is created via new Sftp(conn) / conn.sftp. Every time any SFTP related action is performed in the node explorer a new process is spawned on the remote host. I messed around and tried explicitly closing the sftp sessions with sftp.end() that seemed to solve the issue (caching should also work).
I'm running Linux both locally and on the node, Tailscale v1.48.1, extension v0.6.2.
Hey there, I really like the extension!
I was using it for longer sessions to edit files on my remote Linux node and I noticed that its memory usage was creeping up slowly. In the span of 4 hours more than 500 of these processes spawned and was kept around for as long as vscode was open. These were eating up around 2 GB of my node's RAM by the time I noticed:
I looked around a bit in the extension source - I see that ssh connections are cached in the
SshConnectionManager
but on each SFTP command a new SFTP session is created vianew Sftp(conn)
/conn.sftp
. Every time any SFTP related action is performed in the node explorer a new process is spawned on the remote host. I messed around and tried explicitly closing the sftp sessions withsftp.end()
that seemed to solve the issue (caching should also work).I'm running Linux both locally and on the node, Tailscale v1.48.1, extension v0.6.2.