Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lag when left in Full Screen Montage #526

Closed
steveearle86 opened this issue Jul 18, 2017 · 29 comments
Closed

Lag when left in Full Screen Montage #526

steveearle86 opened this issue Jul 18, 2017 · 29 comments

Comments

@steveearle86
Copy link

Before you create an issue, please make sure you have read the FAQ at https://github.com/pliablepixels/zmNinja/wiki/FAQ. Common questions on API, no image etc are covered there.

Platform & OS Version
Android (Not sure which version)

The version of the app you are reporting:
v1.2.41

Device details:
Android Fire Tablet

What is the nature of your issue
Bug?

Details
Open the app,
go to montage,
set full screen,
leave for some time (not sure exactly how long, perhaps hours rather than days) and the whole app is laggy (pressing the up arrow in the pink circle in the bottom right is so slow, the video image is laggy).
I have this device running zmNinja 24/7 for constant surveillance. I have to close the app by bringing up the app list and swiping it and then reload the app.

@pliablepixels
Copy link
Member

Thanks. Questions:

  1. Do you see a memory build up in the app?
  2. Do you see extra zms processes being spawned in zoneminder over time ?
  3. Is this only in montage? What happens if you keep live view of one monitor for a few hours?

@steveearle86
Copy link
Author

steveearle86 commented Jul 19, 2017 via email

@pliablepixels
Copy link
Member

pliablepixels commented Jul 19, 2017

could you shoot me an email - I have a debug version I'd like you to test (you will need to uninstall the current app) - I'm trying to figure out if its a memory leak. pliablepixels @gmail

@steveearle86
Copy link
Author

steveearle86 commented Jul 19, 2017 via email

@pliablepixels
Copy link
Member

please read what I wrote fully - you need to send me an email.

@steveearle86
Copy link
Author

steveearle86 commented Jul 19, 2017 via email

@pliablepixels
Copy link
Member

[email protected]

@steveearle86
Copy link
Author

I have now installed the debug app and have been running it for a few hours.

I kept getting the following messages in the log

2017-07-20 22:44:57.953816 | web_php |   | 2345 | ERR | socket_sendto( /var/run/zm/zms-310687s.sock ) failed: No such file or directory | /usr/share/zoneminder/www/includes/functions.php | 1993

for 2 hours 30 mins constantly (3630 entries in the database log table)

This continued after a zoneminder restart and also a system restart but stopped when I closed the app.
So far, since I have re opened the app, there have been no more of these messages

Another thing I noticed is that the app had been open for maybe 2 hours and the montage screen froze (i had to close the full screen view and reopen the montage again to get it to restart)

Not sure if any of this is related to the issue?

@pliablepixels
Copy link
Member

Now that you have hopefully been testing the app a bit more, is the issue still the same?

@steveearle86
Copy link
Author

steveearle86 commented Jul 24, 2017 via email

@steveearle86
Copy link
Author

steveearle86 commented Jul 24, 2017 via email

@steveearle86
Copy link
Author

steveearle86 commented Jul 26, 2017 via email

@pliablepixels
Copy link
Member

Thanks for continuing to post your observations. Here is what I think is happening and if that is correct, I don't know how to fix it at the moment, and yes, its possible memory is being flushed automatically.

zmNinja displays the live feeds using and <img src> tag - this is a common HTML tag used to display any image. The difference is that the url pointed to by <img src> happens to be a 'snapshot view' of live monitors rendered by Zoneminder's zms process. What that really means is every 2 seconds the DOM (html tree that represents that page) gets a new image, one for each monitor the montage shows. Now its possible the view is "caching" images and throws them away after a while - that is controlled by the browser (zmNinja uses a chrome web view) and not my app and I don't have any control on releasing that cache (I'll investigate, but I believe this is correct)

@steveearle86
Copy link
Author

Just to let you know, I have had the app open since I last commented and the lag has become 7 seconds IE the screen refreshes every second seconds. I can tell from the zoneminder time stamp at the top of the image

@steveearle86
Copy link
Author

As a work around is there any way I can restart the app on a schedule and open it in the full montage view?

@pliablepixels
Copy link
Member

can you monitor the memory build up using the debug console?

@steveearle86
Copy link
Author

steveearle86 commented Aug 13, 2017 via email

@pliablepixels
Copy link
Member

oh sorry, I forgot, you are running android not desktop right?

@pliablepixels
Copy link
Member

Just emailed 1.2.42 to you

@pliablepixels
Copy link
Member

any updates?

pliablepixels added a commit that referenced this issue Aug 17, 2017
@steveearle86
Copy link
Author

steveearle86 commented Aug 18, 2017 via email

@pliablepixels
Copy link
Member

Hmm thats odd. Not sure if the uploaded file was ok - it resizes fine for me. I've uploaded a debug version again and sent you an email.

@steveearle86
Copy link
Author

steveearle86 commented Aug 18, 2017 via email

@steveearle86
Copy link
Author

steveearle86 commented Aug 20, 2017 via email

@pliablepixels
Copy link
Member

If you are talking about montage, then zmNinja will always be less smooth that ZM web console. To work around the 6 connection limit, I am reloading images every 2 seconds. So image movement won't be the same as the console.

What do you mean by 7 second lag? The images are 7 seconds late? What about the general 'slow down' you reported - menus not responding etc. Is that happening?

@steveearle86
Copy link
Author

steveearle86 commented Aug 20, 2017 via email

@steveearle86
Copy link
Author

steveearle86 commented Aug 20, 2017 via email

@pliablepixels
Copy link
Member

Some more questions:

  1. Does this happen on all phones/devices - incase you have multiple (besides the fire tablet)
  2. How many monitors are you looking at?

@pliablepixels
Copy link
Member

I'm closing this - please contribute/follow in #553

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants