CPU Usage

I've noticed this in most of the 3.x branch. SmartFTP currently drains a steady 30% of my cpu, and sometimes 40%. This is while the application is minimized, and idling (no current transfers, nothing for it to to process).

I tend to have 3 remote browsers, and 1 local browser open at a time. If I close 1 remote-browser, I can free up about 10% cpu. Closing 2 remote browsers, regains most of my cpu - it idles around 5%.

This week, I'll attempt to revert to revert to the 2.x, and 2.5x branches, and try to pinpoint the usage pattern to a specific version release.


My normal usage of an ftp client, is to let the application idle in the background until it is needed. But, the cpu usage prohibits this workflow, because my active tasks (browsers, sql client, etc.) are fighting over cpu control.

Tasks and window focus naturally demand cpu usage. An a small amount of overhead to retain connections is understandable. But, while minimized and idling, the application should use very little cpu.

+- System -----------------------------
Microsoft Windows XP Professional
Service Pack 2 (Build 2600)

CPU Speed : 2128 MHz
Total Memory : 1023 MB
Free Memory : 414 MB

+- SmartFTP ---------------------------
Version : 3.0.1016.0
Time Stamp : 2008-05-06 17:49:53
Platform : x86
Unlicensed
Days in use : 480

+- Application DLL --------------------
sfFTPLib.dll : 1.5.13.21
sfFavorites.dll : 1.0.12.0
sfFavoritesShellExtension.dll : 1.0.1.9
sfTransferQueue.dll : 1.0.9.0
sfFTPShellExtension.dll : 1.0.7.0

+- Language ---------------------------
SmartFTP.exe : 3.0.1016.0

+- Internet Explorer ------------------
Version : 7.0.5730.13

+- Winsock ----------------------------
Winsock : 2.2

Hm I'm unable to reproduce this. SmartFTP uses 0% here when its minimized regardless of the amount of remote browsers open.

Does it only happen with a particular server or any server connection you open? e.g. try to the following:

1. Open 3 Remote Browser to ftp://ftp.smartftp.com
2. Open 1 Local Browser

Regards,
Mat

Do you have any files/folders selected in the Remote Browser or Local browser?

Regards,
Mat

[I am seeing this behavior too when the app is not minimized to tray.

So when its open or minimized to taskbar cpu usage 30-40% constantly regardless of connections open.

Minimize to tray and drop to 0% not seeing any memory leaks and amount of memory used seems normal ~10MB when Idle. just a few when minimized to tray.

version 3.0.1014.7

Please create a movie showing the problem.
http://camstudio.org/

Thank you
Regards,
Mat

Thank you for the video. It uses about 20% of cpu here (on Windows Vista) when moving the mouse like crazy in the SmartFTP window when a local browser and a remote browser window is open. We will look into it.

Try to install the latest version from https://www.smartftp.com/download
We did some changes recently.

Regards,
Mat

i still have the same problem with this build.

Hello ...

We have optimized some functions. Please try it again with the latest version:
https://www.smartftp.com/download

Our tests showed that the CPU usage was reduced by 50% when the mouse is being moved. When the mouse is being moved the OnIdle() function is called which updates the UI controls. For example it sets the state (enabled, disabled) of the buttons in the toolbar. The state of the buttons sometimes depend on the position of the mouse or the resulting action of a mouse move operation. Hence it needs to be updated after every mouse move.

We are aware that CPU usage is still relatively high when moving the mouse cursor and it is proportional to the amount of open mdi windows (Local Browser or Remote Browser). What we are unable to reproduce is the high CPU usage when there is no mouse/keyboard activity in the SmartFTP window.

Thank you
Regards,
Mat

This update significantly reduced the problem, great :-)

Now when SmartFTP is minimized it only uses around 10-20% CPU, maximized without mousemovement 20-30%, and maximized with normal mousemovement 45-50%. And when e.g. the about box is open (disabling the UI effects) still ~0%. It's still very CPU consuming, but at least this new update makes it unnecesarry for my CPU fan to be too noisy when SmartFTP is minimized :-)

How many Local Browser and Remote Browser do you have open?

Regards,
Mat

I have made some further changes which decrease the CPU usage. Please test it again with the latest version (.13) available from:
https://www.smartftp.com/download

If you close all windows (menu: Windows->Close All) the CPU usage shouldn't be higher than 1-2%. The problem is mostly caused by the Remote Browsers and Local Browsers.

Regards,
Mat

Yes i do have a lot of Remote Browsers - currently 13 to be exact. I am multitasking a lot ;-) But shouldn't only the visible UI controls be updated?

I just tried .14 with only 7 Remote Browsers, which improves it slightly more.

Now when SmartFTP is minimized it only uses around 0-10% CPU, maximized without mousemovement 5-20%, and maximized with normal mousemovement 25-45%.

Hello Allan ..

That explains a lot. Theoretically yes but the MDI frame window does not check what mdi childs are visible (as in not obscured) and sends the update message to all of them. So at the moment the controls in all your 13 windows are updated. I will look at a solution for this.

Regards,
Mat

I see

Anyway, thank you for the quick handling of the problem so far!

I just tried .14 with only 7 Remote Browsers, which improves it slightly more.

Now when SmartFTP is minimized it only uses around 0-10% CPU, maximized without mousemovement 5-20%, and maximized with normal mousemovement 25-45%.
I have been watching these threads with interest over the last few days and have also installed release v3...14 and can say there is a significant improvement. But it certainly isn't as quiet as release 2. I have the Windows Task Manager open as a write this email and SmartFTP keeps leaping into second position (1 local/1 remote window), sometimes over 10%, so still room for improvement. Probably sufficiently better that I will not be opening the Settings window to stop it while I work elsewhere which is what I have been doing and is quite effective.

Hello ..

I did some further changes which should again lower the usage significantly:
Please try the latest version (.15) from there: https://www.smartftp.com/download

There is still one known problem I'm trying to find/fix and then the usage should be constant regardless the number of MDI children open.

Regards,
Mat

I have installed release v3...15 and can say that has really fixed it. Hardly any activity showing on the Windows Task Manager and reflected in operation of other applications.

Many thanks, job well done!!

Wow, that was a huge improvement!

Now my CPU usage is only on ~0% both minimized and maximized without mousemovement. Heavy mousemovement over the SmartFTP UI controls results in 20-40% CPU usage.

Hello ..

The newest build (1020.1) reduces the CPU usage when there are many MDI windows open. You can get it from:
https://www.smartftp.com/download

Thanks
Mat

I have many remote browsers too so I have at any given time 5-6 open sometimes many more. I ended up waiting instead of re-installing 2.5 again and this latest build is a huge improvement. It doesn't seem to use any CPU while idle now which is great sorta like previous vs. Still uses a good amount with mouse movement but at least its much much better while not in use.
Thanks for fixing that.