SyncTrayzor: Windows host for Syncthing. Installer, auto-start, built-in browser, tray icon, folder watcher, and more

I’ve also checked the current version. It’s always around 100-200MB, but I see that almost always 2 chromium instances are running, even when Syncthing is not active. Not sure what the second one does. Maybe it would be possible to get a detailed process hierarchy via Process Explorer to see where the memory went?

Yeah windows 7/8, C#, VS2013 with some GUI framework, Made some more progress, here is a preview, but it’s far from ready. I’ll make a dedicated thread as soon as it is somewhat useable, if ever. This is not the right place for it.

2 Likes

This looks darn awesome.

Which memory? Private working set? Private bytes? Working set? It’s important to distinguish which number you’re reading. Here’s a screenshot of Process Explorer with more figures turned on: in order, they’re, Private Bytes, Working Set, Private Working Set (WS Private) and Shareable Working Set (WS Shareable): http://imgur.com/oASZS5M. SyncTrayzor’s private memory usage is 70MB - the rest is shared libraries, most likely .NET: this memory is shared across multiple applications. Likewise the two CefSharp processes are sharing a good portion of their memory

You should see two CefSharp processes while SyncTrayzor is displayed/minimized, and one when it’s in the tray. I used to close as much as I could when SyncTrayzor was minimized, but that lead to Syncthing UI dialogs being closed, which was annoying. There’s no way to shut down CefSharp completely unfortunately: this is documented.

Sorry for replying a bit late (things to do IRL). I was running the 1.0.7 and updated to 1.0.8 (always portable) after your post. It has been on since then and I’m around 90-95MB (as displayed in Windows Task Manager). I’ll let it run until tomorrow but I think it’s better now.

I just counted how long it took to open, double clicking from the tray took 15 seconds for the window to appear then a further 25 seconds for the Chrome part to load. Whilst waiting for the Chrome part to load clicking any menu items took about 3 seconds each to display, the window could be moved around.

Will report back with memory usage as seems better atm. BTW I use x64 portable.

Thanks for the update. I’ve been doing a lot of profiling and testing this weekend. I’ve found a few places I can improve, and I’m now seeing typical memory usage around 60-70MB (as shown in Task Manager).

Interestingly, if I remove the the embedded browser component, memory usage drops to about 40MB, so that’s taking about 20-30MB of in-process memory, plus whatever’s used by CefSharp.BrowserSubprocess.exe.

I’ve added memory usage logging, which will be in the next release. If we can’t get to the bottom of this before then, maybe that will give us some more clues.

That’s definitely not right - I’ve never seen it take so long myself, so there’s something happening in your setup which isn’t present in mind, I presume. Does it respond quickly when it’s first been started?

Some more profiling later, and my managed memory usage is at about 6-7MB. Everything else is the embedded browser component, and .NET.

Again, if you’re seeing memory usage increase over time, please post the log file as I described earlier. That may give us some clues into that out-of-the-ordinary things are going on that may be causing this.

It’s also worth noting that I delay loading the embedded browser until the first the time that SyncTrayzor is maximized from the tray icon. So if you let SyncTrayzor autostart / start it with -minimized, you should see significantly lower memory usage (up until the point that you restore it from the tray icon).

Hello @canton7 ,

Sorry to reply so late…

Finally, the memory hog as displayed in the process explorer has moved from SyncTrayzor to the Syncthing process itself. It sometimes takes up to 95% of the CPU and almost all of the memory. But that is a Syncthing issue, right ?

By the way, thanks for the new version !

Other points (if I can ask for it here) :

  1. Might seen “nooby”, I can’t find how to change the display language :confused:

  2. Request : could you please resize (on create tabs on) the Settings box (File > Settings) ? It’s vertically so “tall” that it’s hard to reach the bottom options and the “Save” and “Cancel” buttons (I guess).

Thanks.

Interesting that it would “move”. Yeah, that’s a Syncthing issue. If you see SyncTrayzor taking up a lot of memory / being slow to respond again, please let me know! v1.0.9 has some logging around memory usage, and I’d love to see the logs.

SyncTrayzor will use your system language, if we’ve got a translation for it. Currently, we have de and nl-NL. If you want to explicitly specify a language to use, start it with the -culture flag, e.g. SyncTrayzor.exe -culture=de or SyncTrayzor.exe -culture=nl-NL. Beware that this is intended for debugging and you’ll get a crash if you specify an invalid culture!

If we don’t yet have your language, you can help :smile: See Localization · canton7/SyncTrayzor Wiki · GitHub

Issue opened:

Excuse my ignorance, but is this (even likely) to be incorporated into the official syncthing file, so that there is a windows installer, or is it always going to be maintained as two separate developments?

Ongoing, fairly sparse, discussions at the moment. I’d be up for it, but it’s on the say-so of the powers that be.

2 Likes

I came across another option, “Squirrel for Windows” smoothest install and update experience on Windows that I have ever seen! Mac-like.

Potential drawbacks:

  • No UAC (by design)
  • That means program gets installed to %LocalAppData%

Advantages for end-users:

  • Double click the installer, and bam, it installs, puts a link in Start Menu, and runs, with no wizard, no next button, no UAC.
  • Close and reopen the app, and it will be updated! Or, reboot the computer, and it will be updated!
  • User never gets asked about updating (like Chrome). It just magically gets better.

Nice things for devs:

  • Package your app into a nuget. There are tool(s) to do this.
  • Updater calculates deltas to minimize bandwidth use. Uses some sort of Windows OS delta mechanism. (Not totally optimal in current version, but maybe soon.)
  • Deployment: copy all the package files/deltas to some HTTP(S) server!
    • (No server implementation)
  • [optional] There is some sort of built-in way of getting HTML formatted release notes (that you enter in markdown.)

Pro-tip:

  • Code sign the app to get around Anti-viruses. (Comodo is one company that does this. You have to prove you are a real business. Might cost around $99.)

Thanks for the link! Looks interesting. I’m fundamentally opposed to installing applications in localappdata: UAC exists for a good reason, and I like to back up my appdata folders (to preserve application settings), but I have to specifically exclude all the applications that have decided to install there.

However I’m rapidly being convinced that we need the option for silent updates! I’m thinking of taking the Firefox approach of having an update service, which runs the inno setup installer in unattended mode.

I’m fundamentally opposed to installing applications in localappdata: UAC exists for a good reason, and I like to back up my appdata folders (to preserve application settings), but I have to specifically exclude all the applications that have decided to install there.

I guess the squirrel thing isn’t for you then. I’m the same way, and as I mentioned, installed Cryptoprevent to block programs from running there (since that’s where syncthing got installed to. Or was that AppData?) My stance may be a bit mushy though. I love to make things easy for users.

However I’m rapidly being convinced that we need the option for silent updates! I’m thinking of taking the Firefox approach of having an update service, which runs the inno setup installer in unattended mode

Does this stay running in the background? The quicktime/java/etc. updaters that run in the background and do nothing are a pet peeve of mine and I imagine any other people. I’m not sure how Firefox’s approach works though.

I’ve no idea what the java one actually does, since it still seems to always put up a UAC prompt!

Mozilla’s approach is to leave the update service stopped most of the time. They set up permissions so that a normal user can start the service, then it’s kicked off when an update needs to be applied. More info here: https://wiki.mozilla.org/Windows_Service_Silent_Update

The other option I’m playing with is to present a custom toast message from the tray icon, which has a button to kick off installation of an update.

There are pros and cons to each approach. I’ll open an issue with a braindump of my findings and thoughts next week when I have a computer.

I haven’t seen this mentioned (may have missed it) but I’m not sure what browser resources Trayzor is using? Those seeing high memory usage, like princejosuah, may have huge plug-ins/add-ons for their browser (like AdBlock Plus which is huge).

For me, it loads plenty quickly and task manager shows around 50MB. This is on a low-end Celeron laptop Win 7 x64 v 1.0.9 and 0.10.29.

@Cydron I don’t think modern .NET has many problems with memory leaks. I have .NET apps (such as Windows Firewall Control) that run 7/24 on PCs that get re-booted perhaps twice a year with zero memory issues. If SyncTrayzor had a significant memory leak most of us would be seeing high usage.

Also, SyncTrayzor updated itself yesterday and I did not receive a UAC dialog. It’s possible, however, I started it with “run as admin” which might be the easiest solution for now to that issue? I wouldn’t sweat the update issue for now. Lots of apps run into UAC issues and sometimes the “cure” is worse than the problem. Firefox got flack for their method for silently updating for example.

Overall I want to thank Canton7 and other contributors for SyncTrayzor. It so far has “just worked” for me and made setting up Syncthing painless.

It uses CEF, which is basically embedded Chromium. It should work independently to any other browser setup on your computer, so things like plugins/addons are a non-issue.

That depends! The built-in WebBrowser control leaks unmanaged memory like nobody’s business - I was subjecting people to a 20MB memory increase each time they minimized SyncTrayzor to the tray and restored it! Another time I was losing a few MB per close-to-tray/restore because an binding was rooting the entire visual tree, when I wanted it to be destroyed. There are still things that can catch you out :wink:

I’ve spent days running SyncTrayzor in a profiler doing everything I can think of over and over and haven’t managed to trigger any other leaks, so I’m reasonably confident it’s all working as it should, but I’m very interested to hear if people have found ways of making it behave otherwise.

That will be Syncthing auto-updating, not SyncTrayzor. SyncTrayzor does not currently auto-update: it will display a prompt on start-up saying “hey, there’s a new version” and link you to the Github downloads page, but it’s up to you to download and run the new version’s installer. I’m in two minds as to whether we need to go completely silent on the updates (I’ll braindump into a Github issue later today, hopefully), but I agree we need to be better than we currently are.

Thanks!

This should be fixed in v1.0.10

1 Like

Hey guys. Seeing today’s update of SyncTrayzor and what is new - just wanted to thank you. Good job. You are doing syncthing much more usable for regular windows user. Really appreciate.

I am also C#/WPF developer so I am offering my help if you would need anything. One thing I am missing is better and faster information about what files where synced into my computer. When a friend of mine sends me a file to our dropbox shared folder, dropbox shows me this in bubble from systray just after the file is synced. I was thinking about a small popup window next to systray showing last synced files for each repo… similar to the UI dropbox has on windows… maybe with some quick actions right there and button to open full GUI window. What do you think?

I am attaching the dropbox popup in case you are not familiar with it.

1 Like