Richard Naninck wrote:...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.
So maybe it's related to the machine the remote is running on. Are you seeing it on more than one remote?
Maybe network related??? When a panel switches, it has to request the current property values for all of values managed by controls on the panel, so there's some network activity that could... maybe... slow things down. Just a thought.
I can't test this on another machine since that would introduce that so called status bug. Plus it's now running on my fastest PC.
I have scanned all of my ports etc and don't see anything strange. I will look at the network monitor to see if it is network related. But why oh why is it OK after a theme reload. Network stress should be the same. Memory also doesn't make sense since it doesn't matter if panels are switched on and of for hundreds of times just after a reload and if I leave it alone for a while it will get slow by itself. It's one of those things that doesn't make sense but I will continue the search and report any findings. I guess that I am the only one having this issue since nobody reports in this thread.
Richard, don't assume you're the only one experiencing the problem. It could be that your theme is the most complex of all them out here in Housebot Land. From what you've described of yours, I suspect that the problem is just more apparent in yours. That brings up an interesting side question: I wonder what the panel and theme count max is on any HB server we have running. Scott, any idea who the Power HB user is? FWIW, I'm running three themes. Panel count is 14, 13, 5. Three VBscripts running in the background. What HB characteristics are the most resource intensive: Theme count, panel count, control count, scripts, images, ...?
I have 64 panels of which about 50 are main panels in XGA resolution. I have 42 scripts of which 28 are constantly running. Didn't count tasks etc. I have only one theme running, but it is still expanding.
Every script als has a null device with many properties.
All of this still doesn't explain the 'getting slower'part after reloading. It should be slow from the beginning if load were to be a problem (I guess).
I must admit that it may be more obvious in my system compared to remotes with less theme panels.
I have a task restart my theme somewhere during the night now, so it doesn't bother me that much. But almost all of the bugs / problems I have encountered during the last 3.5 years have been resolved. And maybe someday this thread will trigger something or somebody to find a possible bug or problem which introduces this effect. The remote a friend of mine is running (straight copy of mine) is somewhat reduced in tasks and scripts since he doesn't have all the hardware that I do. I just don't like the 'not so obvious' problems. It just doesn't make sense (right now).
For some unknown reason I see a remote swremote going into sleep mode if it hosts more than 30 status properties on a single panel. Maybe it is related in some way. On the local machine it doesn't go into sleep mode (pfew..), but status heavy panels may still cause some problems even on a local PC during time.
Before I noticed this slow down I always had my SWRemote minimized to be able to use the PC for other stuff as well. Since the PC is becoming more and more just a SWRemote with HBServer I figured I could better leave the remote maximized. Come to think of it, that is about the same time I started having this problem. Today I figured I would minimize it again for test purposes and it remains quick (for the time being).
Is there is difference in a maximized or minimized remote over time?
The cpu spikes higher and higher over time giving me the slow down. So not sure if it is network or video related. I am still guessing here and will conduct some more tests. If it turns out that the difference is truely between minimized (no slow down) and maximized (slow down), can you think of a reason that would do this?
There's nothing different in the code between minimized and normal. I suppose it's possible that the OS may do some optimizations between the different states, such as not drawing updates.
The difference may be in the focus part. When minimized, the swremote doesn't have focus and when maximized it does. It probably handles more events when in focus. I have tested for a day now in minimized mode and it remains quick. Now I am testing again maximized. I did change some other stuff as well, so I need to do this test to make sure. If it slows down again atleast we have a clue and I will report back.
OK, it looks like accumulated time in maximize causes the slow down.
Minimizing and maximizing again doesn't help. Only a theme restart or reload does. Keeping it minimized keeps it fast. I guess in time this will get slow also but that will take much more time since the theme is only maximized for the duration of use.
I finished setting up a complete new server PC with fast hardware etc. The problem remains the same. However I found out the following:
Theme always minimized and only maximized to push some buttons -> OK
Theme always maximized, but not set on an actively changing panel -> OK
Theme always maximized, but set on an actively changing panel -> Not OK.
So what is active and what isn't:
My info panel shows lots of status properties and 2 alphalists. One alphalist gets refreshed each minute displaying system status and the other alphalist gets refreshed every 20 seconds displaying an rss news flash. The rest of the status are simple numbers of email counts, alram state etc. Furthermore it displays a status intensive pop panel which contains changing weahter info each 30 minutes and now playing status. Setting the remote to for instance my email panel all seems OK over time. The email panel also has alphalists, but they only refresh once an email is received and the now playing popup is not show on the panel. So the email panel is not changing that much status over time at all.
When the theme is minimized, it doesn't have focus and probably doesn't get any events for display (alphalist and status properties) change whereas it does when it is active.
So it seems that the swremote gets slower in time once it is actively receiveing events and chaning stuff on screen.
Does that make any sense at all in relation to resetting the problem after restarting or reloading the theme. Do you clear event buffers when reloading or something else which may point in this direction? I guess the database won't change a thing when reloading the theme so it cannot be that. It must have someting to do with the theme being active and event buffers overflowing or so. Network load doesn't increase, but cpu load does over time.
I can fix this simply by either restarting the theme on a task or displaying a panel which is not actively changing much. However that will only postpone the slowing down process over time. Probably others don't see this because most themes are more static than dynamic.
If it has something to do with overflowing buffers, maybe you could program it so that buffers get cleared or whatever. I would be happy to test such a thing and I would notice any differences in a few hours.
The thing is that I don't do anything different if the app is minimized. So it's not that I'm not buffering something differently between the two states.
If you switch to another panel, I tell the server to no longer send updates for the properties on the old panel, but I don't do that for minimized. It will continue to get updates when minimized just as though it were not minimized.
It's strange that with a theme reload, it cures itself. That would seem to indicate a memory issue that gets resolved when things are reset on a reload, but you said that your memory is OK. Do you see it thrashing the disk when things are slow?
No, it just trashes my CPU. A little less noticeble now with the 5200+ I just installed but it still very much there.
I see that the minimized state updates the panels because I don't see a quick change in my alphalist after maximizing which I do see when just switching between panels. I can clearly see the alphalist refresh to the new data. So right about that.
It is starting to look like a windows thing. I guess I gave you all the clues I can find and if you can't figure out an answer, it must not be housebot related.
Yes, the reloading part could have been a good clue. I guess it is just about the same as starting the swremote.
If the databse is left intact while reloading or starting the remote, it can't be that. Is there some mirror buffering going on during the duration of the running time of a remote? For sure something is clogging up and it shows way more rapidly on theme panels that intensively change status.
Maybe you could test it yourself by setting up a panel ith a few alphalists that loop through a directory full of simple text files and see what happens. I might actually do that myself. It is simple to setup and I wonder if it shows even when a theme has only a few panels. There need to be more than one panel, because it is the panel switching part that is getting slow. Clicking buttons on a panel and getting actions from those buttons remain fast all the time so it is just about panel switching.