Make PlexConnect start faster

Hey guys

 

So recently i started became a heavy MyPlex user. It caused that i have my 5 sections and 20 MyPlex libraries. Since then i noticed i have the accessing imovie theater (im using imovie) for something like 10 seconds before plexconnect shows up. before myplex use it was less then one second, so i guess it's because it's searching and loading myplex list.

*My aTV is very close to the router, that's not a signal problem, videos are fast and great!

So if i'm right and it does what makes startup (only) slow maybe we can tell plexconnect to start load myplex list after it's started so in this time i can use my local sections

 

Thanks

same for me

Baa can probably keep me honest here but I believe that this is currently done in a non-parallel fashion; there are plans to change this but having 20 shared servers probably does make you a bit of an outlier in terms of setups. It is interesting and helpful to see what actually happens with those type of setups though.

It was sped up long time ago...

-> https://github.com/iBaa/PlexConnect/issues/224

But at that time, we talked more about minutes or so, depending on the number of shared servers and their availability.

During startup - we have to check MyPlex (https://plex.tv/pms/servers) and then poke the shared servers for availability. This was done serial earlier, but since solving issue #224 (see above), it is done in parallel, using multiple threads. Honsetly, I have no idea, how we would be able to speed this up any more (we could remove the "poking", but then would have an even worse experience later on when browsing to the MyPlex tab.

Yes, in the evening and now when all of shared libraries online (23 to be exact) it's 20 secs at the good case.

What i suggest is when MyPlex is on on some PlexConnect to start PlexConnect and only after the app started which means i can see local sections and tabs start poking for myplex sections (in background, nothing visible to the eye). Of course, if i'll want to go to MyPlex from the beginning it'll show loading and i will still have to wait but it WILL give me access to my local libraries faster instead of waiting same time to get all of it.

20sec is the max timeout for http requests, local or remote. This time will have to pass, if one of your myplex servers is not online - and thus doesn't honor your requests. Add the time for the initial call to myplex and I guess it is fair to say, that 22sec or so is the most you have to wait. Earlier (before issue #224) this max waiting time would have been like 20sec times number of servers, in your case close to 8minutes... and you really complain about 10secs?

Keep in mind, there is not really a difference between "library" and "shared library" from the viewpoint of PlexConnect. It was - earlier, when "library" contained the local servers and "myplex" basically everything else.

But then, unfortunately you guys complained... so we re-engineered that stuff, now showing your own content under the "library" tab, and your friend's stuff under the renamed "shared libraries".That said, nobody defines that "owned" servers are sitting in your local network - they for sure can be remote, too. Same with "shared libraries", they can be remote (most likely, yes), but could also be quite local, think of a students home, the PMS of your wife, or those sections you shared to your kids account...

Also, every single of those local servers might have the "use authorization" option turned on, we have to check with myplex to get access. And receive *some* data before we can display anything.

If you want to speed up the initial start on your side, feel free to reduce the timeout (PlexAPI.py, line 350) to a lower number - like 5sec? Just make sure, you are not getting in conflict with issue #194 when doing so... -> https://github.com/iBaa/PlexConnect/issues/194

20 plex librarys?wtf :D

feels like this is only a specific case.. i have 2 local and 4 remote shared and it works smoth :)

20sec is the max timeout for http requests, local or remote. This time will have to pass, if one of your myplex servers is not online - and thus doesn't honor your requests. Add the time for the initial call to myplex and I guess it is fair to say, that 22sec or so is the most you have to wait. Earlier (before issue #224) this max waiting time would have been like 20sec times number of servers, in your case close to 8minutes... and you really complain about 10secs?

Keep in mind, there is not really a difference between "library" and "shared library" from the viewpoint of PlexConnect. It was - earlier, when "library" contained the local servers and "myplex" basically everything else.

But then, unfortunately you guys complained... so we re-engineered that stuff, now showing your own content under the "library" tab, and your friend's stuff under the renamed "shared libraries".That said, nobody defines that "owned" servers are sitting in your local network - they for sure can be remote, too. Same with "shared libraries", they can be remote (most likely, yes), but could also be quite local, think of a students home, the PMS of your wife, or those sections you shared to your kids account...

Also, every single of those local servers might have the "use authorization" option turned on, we have to check with myplex to get access. And receive *some* data before we can display anything.

If you want to speed up the initial start on your side, feel free to reduce the timeout (PlexAPI.py, line 350) to a lower number - like 5sec? Just make sure, you are not getting in conflict with issue #194 when doing so... -> https://github.com/iBaa/PlexConnect/issues/194

First of all i'm NOT compaining :) Will NEVER complain about something free and just for the community :) Just asking for fixes if possible.

I know it's the same, What i mean is if MyPlex libraries will load in background after app started i can start browsing local libraries. And it's 20 secs not 10 :)

As you explained before it'll make libraries that are online not to be shown so i won't do it :)

Seriously, just don’t try to access so many libraries at one go.

tomer...

As I tried to explain, even your "library" tab might contain remote (but owned) servers. We can't easily make aTV show the local content, and add remote servers to the same page later on. I guess, it would be possible... but not really painless.

In your first post, you spoke about 10sec...

The 20sec make is the timeout we will wait for missing servers. Make sure all your myplex servers are online, and you likely won't hit that timespan.

institute... it's not "so many libraries". The 20sec waiting time is caused by the ONE Media Server currently offline - and with more servers to big chances get higher that one is temporarily failing.

tomer...

As I tried to explain, even your "library" tab might contain remote (but owned) servers. We can't easily make aTV show the local content, and add remote servers to the same page later on. I guess, it would be possible... but not really painless.

In your first post, you spoke about 10sec...

The 20sec make is the timeout we will wait for missing servers. Make sure all your myplex servers are online, and you likely won't hit that timespan.

institute... it's not "so many libraries". The 20sec waiting time is caused by the ONE Media Server currently offline - and with more servers to big chances get higher that one is temporarily failing.

Sure but one of the servers that is shared with me is available only at evening and such things .. Anyway i'll keep waiting to a solution of loading libraries in background :)

Another possible solution-Load app instanely and only then start looking for sections, then instead of showing accessing "x" and you don't know how long it'll take, if that's an error or loading, it'll have a loading bar progress ..

Remove all those myplex libraries it’s slowing it down immensely.

Remove all those myplex libraries it's slowing it down immensely.

What are you talking about? I'm using them ..

Its slowing down your plexconnect instance having that many. You can use them if you wish just expect slow hijacked app startup time. :wink:

Its slowing down your plexconnect instance having that many. You can use them if you wish just expect slow hijacked app startup time. ;)

I know that. Read the whole topic .. Just suggested some stuff.

I hear ya, it would be great if plexconnect loaded myplex after it loads the hijacked app, I agree :wink:

You might as well have an initial wait instead of scrolling over to shared libraries then having to wait 20 seconds then.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.