SWRemote getting slower in time

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

SWRemote getting slower in time

Post by Richard Naninck »

Scott,

Not sure when it started, but it must be close to the latest update to 3.02.01, my swremote is getting slower while running when time passes. After startup, the swremote is very agile and responds directly to all panel changes being it from a panel change button or a large script containing commands to open panels. After some time, an hour or so, the swremote is becoming slower and slower to respond. It starts with the script OpenRemotePanel commands, but after a day or so everything is very slow. While leaving the HBServer running, but restarting the swremote, all is fine again for some (short) time. I waited some time to report this because I am really not sure what is going on. I had the lastest server version running with the previous SWRemote because my buttons don't draw correctly while using the latest SWRemote. So now I downgraded again to 3.02 and I have to wait to see what happens. Can it be that tis is introduced in the latest version of the server? Can it be that the latest server version in combination with the previous swremote creates this behaviour?

My version number is still showing 3.02.01 but I am sure I downgraded to 3.02 because the theme editer now also draws the buttons correctly again. That would mean that the displayed version numbers are stored somewhere else -> registry or database maybe?

Could this new button drawing routine have something to do with it?

Restarting the server has no effect on the speed, only restarting the swremote does.

It is so pronounced that I am sure it happened a short while ago. Not tested it on other PC's. Maybe others see the same thing?!

And it doesn't matter how many panels are selected before slowing down. I clear my image cache at restart of the swremote and the remote is also getting slow when almost no images were downloaded yet because not many panel changes have happened.

Lot's of scattered info, I know but I want to be complete.

Last but not least.. I have no errors in the error log and even non scripted panel changes become slow after some time.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

It's odd that it would get slower over time. Points more to a memory issue. Make sure you do not have tracing enabled on the SWRemote.
Scott
Steve Horn
HouseBot Guru
Posts: 755
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Post by Steve Horn »

Are you launching executables on the remote(s) repeatedly (e.g. mplayer2.exe) that are not releasing memory when they close? Can you check Task Manager to see if you have duplicates running in the background? Personally, I've only noticed a slowdown on tablet PCs with limited memory running SW Remote. And its not associated with any particular version of HB. I just chalk that up to typical Windows behavior. If I restart Windows, all is ok. But I don't (yet anyway) launch any local-to-the-SW-remote applications either.
Steve
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Yes I do execute stuff from the swremote, but I have no memory issues. Never had also! I have 2GB internal memory and no virtual drive. Memory usage is constant. I am running a downgraded HB version. Lets see what happens.

EDIT: Tracing is not enabled.
Steve Horn
HouseBot Guru
Posts: 755
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Post by Steve Horn »

This is somewhat off topic, but it relates. If local to the SW-Remote applications are launched (again e.g. Mplayer2.exe in order to play a wav file) how does one close that app after the file is played? The little work I did with it last weekend, left the app open. I suppose that's not fatal, but if there's a way to launch/play/close I'd rather do that.
Steve
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Below an example of launching PlayWav.exe to play voicemails. I also run Outlook from a theme button, but Outlook gets closed manually by me. Another example blow the first is how one can run an app using run

Code: Select all

'-------------------------------------------------------
'-------------------------------------------------------
'-------------------------------------------------------
Sub Play_Voicemail(VMailFile)
Dim MyShell
Dim CommandString
Dim ReturnCode

	Set MyShell   = CreateObject("WScript.Shell")
	CommandString = Chr(34) & "C:\Program Files\Meedio\Meedio Essentials\data\prog\PlayWAV.exe " & Chr(34) & Chr(34) & VMailFile & Chr(34)
	ReturnCode    = MyShell.Run (CommandString, 0, True)	Set MyShell   = Nothing
End Sub

Code: Select all

Call Execute_Program(PCName, "C:\WINDOWS\system32\rundll32.exe", "nview.dll, nViewCmd loadprofile DualView_32_Bits all", "No")

'-------------------------------------------------------
'- Execute Program for the PC in Control ---------------
'-------------------------------------------------------
Sub Execute_Program(PCName, Arguments, ProgName, Wait)

	SetPropertyValue "Execute Program " & PCName & ".Arguments", Arguments
	SetPropertyValue "Execute Program " & PCName & ".Path and Name of Program", ProgName
	SetPropertyValue "Execute Program " & PCName & ".Wait for program to complete", Wait
	SetPropertyValue "Execute Program " & PCName & ".Execute Program", "Yes"
	
	If ProgName = "C:\WINDOWS\system32\powercfg.exe" Then
		Sleep 500
		Call Check_CNQStatus()
	End If
End Sub
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Downgrading HB didn't matter. It's still getting slow. I just kept the SWRemote running, but with the right mouse click option menu I selected to 'Reload the theme' and after doing that I go from up to 2 seconds from opening a theme panel to instantly opening a theme panel. memory stays the same.

Next time I will test this is with reloading the theme without Deleting the images from the Configuration menu. Obviously I can work this around by auto restarting the swremote every night, but I really wonder why this happens.
Steve Horn
HouseBot Guru
Posts: 755
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Post by Steve Horn »

Interesting. Maybe that was my problem too, and I was attributing it to a memory deficient tablet and of course Windows. I haven't noticed it recently (since upgrading the tablet in the theater), but maybe its a function of panel count and complexity. Your theme is more complex than mine. I'll have to watch and see if a simple remote reload fixes it. I've been restarting Windows.
Steve
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

I may have not noticed this slow down over the past few years because I almost make daily changes to my theme and therefore restart it often while the server remains running. Now that I just can't think of new features anymore I make less changes to the theme and this has become more prominent. All buttons on a selected theme panel always react instantly. It doesn't matter if a button controls a running script or it just sets a property by itself. The only thing that slows down over time are panel changes. Scripted panel changes through OpenRemotePanel or panel changes through a panel change button suffer from this slow down. Furthermore, it's just about the main panels because pop panels are always as quick.
I don't see any memory problems and reloading the theme from the SWRemotes Menu options fixes it. I do have a very complex theme with many main panels, but why is it fast after a reload and do main panel changes slow down over time going from instant to about 2 seconds to react?
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Richard Naninck wrote:... The only thing that slows down over time are panel changes. Scripted panel changes through OpenRemotePanel or panel changes through a panel change button suffer from this slow down.
So are you saying that it's ONLY primary panels that are changed using OpenRemotePanel, and only after running for some time? If so, could you put a panel change button on a page and do a test to compare invoking the page with the button vs. the OpenRemotePanel call?

If it's the call, the latency may be coming from the server, not the remote.
Scott
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

I have many main panels with panel change buttons as well as buttons that change panels through the OpenRemotePanel and both suffer the same slow down. If you want me to test on a panel with two buttons for changing to the same panel where one is a panel change button and the other is an OpenRemotePanel button, I will. Now some panel change buttons jump to certain panels where other OpenRemotePanel buttons jump to other panels, but all from the same panel. It is visible throughout my complete theme, but some panels show it worse then others. I will keep on testing.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Scott,

Is it possible to Exit the SWRemote from a parameter other than pressing the applicable Exit theme button like SWRemote /exit?
I tried SWRemote /Exit, but it just starts the SWRemote.
Right now I have setup a task that restarts the SWRemote somewhere during the night. It sets a command to an Action property which triggers a script Sub. The Sub kills the swremote using powershell.exe through an External Command Device and waits for it to complete. After completion I restart the SWRemote. I don't notice anything about this and it restores the speed. However this is a workaround and it leaves the swremote icon in the traybar because it is killed using powershell.exe (same as taskkill). If there were an exit parameter, it would probably clean up the icon in the tray. Come to think of it... such a parameter probably doesn't exist since it is possible to start multiple swremotes on the same machine and then it would either kill all, or wouldn't know which one to kill.

Further testing points out that it doesn't matter if a main panel is called through a panel change button or a script OpenRemotePanel. What does differ is that panels that display alphalists become slower to appear whereas panels that only show buttons still seem to open fine. Could it be that the database is cleaned up in some way when the swremote starts so alphalist info becomes easier to display and less easy to display when time passes?

My next test will be to compress the database and have the swremote run for an extra day without implementing the restart task yet.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Richard Naninck wrote:Is it possible to Exit the SWRemote from a parameter other than pressing the applicable Exit theme button like SWRemote /exit?
No, there's no command line option to do that.
What does differ is that panels that display alphalists become slower to appear whereas panels that only show buttons still seem to open fine. Could it be that the database is cleaned up in some way when the swremote starts so alphalist info becomes easier to display and less easy to display when time passes?
Well, that's a clue anyway. Do you notice any differences between panels with and without dynamic images?
Scott
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Almost all panels that have dynamic images also have alphalists except for my weather panel and I don't see a big difference. Few panels suffer more than others. My calender panel has 2 layered dynamic images and 3 alphalists. My movies panel has a few small alphalists and many dynamic images. My settings panel has no dynamic images and 4 alphalists and switching to that panel the slowdown is very prominent.
I just can't figure out why. My theme is a bit complex I guess. Almost all panels have enter and exit list commands. Almost all panels pop a so called 'Now Playing' panel and the ones that don't, become slow after some time. Maybe that's another clue?! Come to think of it, panels getting slow mostly have alphalists and don't pop the Now Playing panel.

I enabled the SWRemotes Trace option, but found no errors nor does the HB Server error log show any errors.

A reload makes switching to all panels instant and it doesn't slow down with the amount panel change actions, just with time.

I guess this will result in a workaround like a restart just like the ever existing and so called status bug where more than 30 status properties are visible on a single panel, but that only happens on remote swremotes. I abandoned that concept all together so it doesn't bug me anymore.

If you ever find something strange and remember this discussion, that would be nice unless you can come up with some of your brilliant questions to get me test some more;)
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Still working the problem. I just checked my CPU usage during quick panel changes induced by panel change buttons and I get a max of 30% cpu usage. Before that the swremote ran for about a day and it was slow again so I checked the cpu usage doing the same as above and the cpu goes all the way to 100% during panel switches.

I have random rss news refreshing an alphalist every 20 seconds. I killed that script to see if this hurts the speed after a while. What bothers me is that my complete setup is now running at a friend of mine and he claims his swremote remains agile even after time. Something is wrong that's for sure.
Post Reply