NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 2 3 4 5 6 … 93 Next »
Web Client: Slow with separate thread and date not obscured

 
  • 0 Vote(s) - 0 Average
Web Client: Slow with separate thread and date not obscured
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#1
2015-10-17, 07:12 PM
Trying my PhotoFilter plugin in the (X-Newa) web client I have run into a few issues.

I use a separate thread to load the photo "grid" so I can show a "Loading" message since it might take a while. This is taking a much longer time in the web client only when using a separate thread. For example, loading and displaying 40 photos using the separate thread takes around 1 second in NPVR on the PC but in the web client it takes around 8 seconds. If I modify the plugin to not use a separate thread, the web client loads and displays in about 1 second as expected. Any idea why the delay in the web client only with a separate thread?

The other problem is when I'm displaying a photo full screen, the date/time is not being obscured in the web client like it is on the PC. I am using the "block-extras" UIElement.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,117
Threads: 957
Joined: May 2006
#2
2015-10-17, 07:55 PM
For the first scenario I tihnk part of the problem is web client and part is NextPVR and I have asked Panda (sub) to look into them First I don't think the output from PluginHelperFactory.GetPluginHelper().ShowMessage(...); is passed to web client. The second problem is more fundamental, web clients is stateless so x-newa updates on keystrokes or every 10 seconds. I have sub to make the refresh rate set by the plugin using something like
<meta http-equiv="refresh" content="nn"> for http

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#3
2015-10-17, 08:03 PM
cncb Wrote:I use a separate thread to load the photo "grid" so I can show a "Loading" message since it might take a while. This is taking a much longer time in the web client only when using a separate thread. For example, loading and displaying 40 photos using the separate thread takes around 1 second in NPVR on the PC but in the web client it takes around 8 seconds. If I modify the plugin to not use a separate thread, the web client loads and displays in about 1 second as expected. Any idea why the delay in the web client only with a separate thread?
It's probably taking the same length of time, but there is known limitation with the web client which maybe making it appear this way.

The web client doesn't really handle asynchronous screen updates. The way it works - the web client passes any key presses to the server, then askes for the current screen. The web client has no idea if the screen is asynchronously updated later, so doesn't ask for a new screen. It's a known issue that has existed since the beginning of the web client. I've thought about how to fix it a few times, but haven't really come up with anything I'm happy with yet. Any fix would need changes on the client side of things too.

May need some sort of "have their been any screen updates?" call that the client can make frequently, and if gets back "yes", then ask for a new screen.

EDIT: what he said.
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#4
2015-10-17, 08:08 PM
My "message" is just text on the plugin screen so I don't use the ShowMessage() popup (sorry I didn't make that clear). It sounds like the second issue might be at play here, though.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#5
2015-10-17, 09:47 PM
mvallevand Wrote:For the first scenario I tihnk part of the problem is web client and part is NextPVR and I have asked Panda (sub) to look into them First I don't think the output from PluginHelperFactory.GetPluginHelper().ShowMessage(...); is passed to web client.
I just tried this here, and it does shows my ShowMessage in the WebClient. Were you showing this message directly in one of the main calls (nested inside OnKeyDown etc), or something you're doing asynchronously?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,117
Threads: 957
Joined: May 2006
#6
2015-10-17, 10:20 PM
I've never actually seen one, so I assumed they were not shown. My UPnP plugin http://www.nextpvr.com/nwiki/pmwiki.php?...n.Universe shows it pretty well because there is a long delay for UPnP discovery. It is in the start of the first PopulateList() main call.

Martin
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#7
2016-04-03, 09:12 PM
Were you able to think anymore on how to do asynchronous updates with the web client? I have a slideshow in the PhotoFilter plugin which this causes problems for when the duration of the photo display is something other than 10 seconds.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#8
2016-04-04, 11:31 AM
Sub,

It would probably require some changes to the plugins in addition to changes to NextPVR but how about adding a reload-in-time property in response to /Activity (which is called upon receiving every screen update).
The property would be the time in millisecs or something to when the client is supposed to ask for a new screen update. If thread isn’t done by then it’ll provide another “reload-in-time property” in activity.

This would also solve the animation issues in various plugins.

Another option would be the use of websockets to create as push-function but that’s a bit more complicated.

If NextPVR was able to detect threading inside a plugin I can imagine a default reload time of 1 sec would be good enough in most cases and no changes to plugins would be needed.

/Fred
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,117
Threads: 957
Joined: May 2006
#9
2016-04-04, 02:03 PM
cncb Wrote:Were you able to think anymore on how to do asynchronous updates with the web client? I have a slideshow in the PhotoFilter plugin which this causes problems for when the duration of the photo display is something other than 10 seconds.

If your are talking about having the server tell how the client how often to poll no, sub did not implement my wishlist request. @fred I have asked for a JSON equivalent of <meta http-equiv="refresh" content="nn"> in Action and ms is best but maybe there is another way.

Martin
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#10
2016-04-05, 02:43 PM
mvallevand Wrote:@fred I have asked for a JSON equivalent of <meta http-equiv="refresh" content="nn"> in Action and ms is best but maybe there is another way.
Martin

Been quite busy for a while so I didn’t spot your request.
Anyways, we're on the same page, great!
I hope sub will reconsider.

/Fred
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): 1 2 3 4 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Developing Android TV client fred250 2 1,890 2020-11-16, 06:33 PM
Last Post: fred250
  How to tell when video playback has finished in web client? cncb 6 4,379 2015-09-29, 08:07 PM
Last Post: cncb
  How to get edl information for videos in a web client? fred250 27 10,874 2014-12-10, 12:39 AM
Last Post: fred250
  Remote client logout timeout. mvallevand 2 2,590 2014-10-28, 12:55 AM
Last Post: mvallevand
  Tuner plugins and client id mvallevand 2 2,114 2013-07-03, 01:39 AM
Last Post: mvallevand
  Client - Tuner plugins mvallevand 53 13,774 2011-09-17, 07:19 PM
Last Post: mvallevand
  Date Time display Northpole 0 1,479 2011-08-01, 04:28 PM
Last Post: Northpole
  Suppressing the Date/Time field from global.xml ACTCMS 7 3,321 2010-11-18, 01:36 AM
Last Post: ACTCMS
  Supress Date display in NPVR skin Northpole 13 4,281 2010-10-02, 08:19 PM
Last Post: Northpole
  Client/server detection imilne 1 1,732 2010-08-08, 04:23 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode