speechles 1917 Posted January 27, 2016 Share Posted January 27, 2016 (edited) @@Luke This is one for you. This is a strange one. Maybe we need scully and mulder since they recently came out of retirement? url = url + "/Users/" + HttpEncode(getGlobalVar("user").Id) + "/Items?recursive=true" if filterBy = 1 query.AddReplace("Filters", "IsUnPlayed") else if filterBy = 2 query.AddReplace("Filters", "IsPlayed") end if if sortBy = 1 query.AddReplace("SortBy", "DateCreated,SortName") else if sortBy = 2 query.AddReplace("SortBy", "DatePlayed,SortName") else if sortBy = 3 query.AddReplace("SortBy", "PremiereDate,SortName") else query.AddReplace("SortBy", "SortName") end if if sortOrder = 1 query.AddReplace("SortOrder", "Descending") end if query.AddReplace("IncludeItemTypes", "Movie") query.AddReplace("Fields", "Overview") query.AddReplace("ParentId", m.parentId) Here is the movie fetch for row 0. This one makes the movie screen load quickly. There is no real issue as long as the "screen.recreateOnActivate = false" which it isn't on your version of the app. So remove that line, or make it false and now the movie screen loader works as it should, very quickly. Now the tv screen though has something completely different. if row = 0 ' Tv genres url = url + "/Users/" + HttpEncode(getGlobalVar("user").Id) + "/Items?recursive=true" query.AddReplace("IncludeItemTypes", "Series") query.AddReplace("fields", "Overview") query.AddReplace("ParentId", m.parentId) query.AddReplace("ImageTypeLimit", "1") if filterBy = 1 query.AddReplace("SeriesStatus", "Continuing") else if filterBy = 2 query.AddReplace("SeriesStatus", "Ended") else if filterBy = 3 query.AddReplace("Filters", "IsPlayed") else if filterBy = 4 query.AddReplace("Filters", "IsUnPlayed") end if if sortBy = 1 query.AddReplace("SortBy", "DateCreated,SortName") else if sortBy = 2 query.AddReplace("SortBy", "PremiereDate,SortName") else query.AddReplace("SortBy", "SortName") end if if sortOrder = 1 query.AddReplace("SortOrder", "Descending") end if Okay, now the filter and sort is afterwards in the query. This is what breaks the TV screen and slows it down until the entire query is completed. Moving it so filters and the sort are done first, and putting the rest after like the movie screen fixes the issue. The TV screen will now load fast. This is odd behavior isnt it? When using filters and sorts with the API these should always be first in the query terms? It appears so. Do other apps suffer this same behavior when populating their rows/grids? They must.. Edit: credit @@BAS for being the one who asked about this which got me to investigate. Asking questions is a good thing. Edited January 28, 2016 by speechles Link to comment Share on other sites More sharing options...
BAS 225 Posted January 28, 2016 Share Posted January 28, 2016 A tag of me in a post, is it like 2 years ago... I hope this can be resolved, as I really think this one fix will breath fresh life into the Roku client. Link to comment Share on other sites More sharing options...
Luke 37022 Posted January 28, 2016 Share Posted January 28, 2016 Sorry, good investigation but query.AddReplace is only responsible for building the query string that is then used for the request url to download the items. the order they appear in the url isn't going to matter. Link to comment Share on other sites More sharing options...
BAS 225 Posted January 28, 2016 Share Posted January 28, 2016 (edited) Okay, now the filter and sort is afterwards in the query. This is what breaks the TV screen and slows it down until the entire query is completed. Moving it so filters and the sort are done first, and putting the rest after like the movie screen fixes the issue. The TV screen will now load fast. This is odd behavior isnt it? the order they appear in the url isn't going to matter. to me it sounds like he might have tried this on his own roku and it fixed my issue, the issue being that all of my users basically never click library as the load time is just horrendous, especially if you have a massive library, and forget it if you enter library and then move left on the top row, the client will not respond to any commands really besides directional navigation until it all loads in. Which is a shame cause I think there is plenty of potential to show other things, especially networks/studio as an option on the tv side. Also not to sound rude, but I did try this on the competitor's product with my massive library awhile back with their old client before their redesign, their old client had overkill on rows of filters/sorts imo but the library entry did load almost instantly. Edited January 28, 2016 by BAS Link to comment Share on other sites More sharing options...
speechles 1917 Posted January 28, 2016 Author Share Posted January 28, 2016 (edited) @@BAS Have you tried the blue neon app yet? I updated it with proof. Now load the TV library screen and how quick is it? Now load up the official app and how quick is it? There is a difference with a large library. A night and day difference isnt there? You should notice it and immediately get happy. Please reply back here or the other thread so we can get this in the official app too. Thanks. Edit: When you do lets investigate adding your network/studio rows to tv/movie screens too. Edited January 28, 2016 by speechles 1 Link to comment Share on other sites More sharing options...
BAS 225 Posted January 28, 2016 Share Posted January 28, 2016 @@BAS Have you tried the blue neon app yet? I updated it with proof. Now load the TV library screen and how quick is it? Now load up the official app and how quick is it? There is a difference with a large library. A night and day difference isnt there? You should notice it and immediately get happy. Please reply back here or the other thread so we can get this in the official app too. Thanks. Edit: When you do lets investigate adding your network/studio rows to tv/movie screens too. http://emby.media/community/index.php?/topic/24151-theme-blue-neon-night/?p=293576 Link to comment Share on other sites More sharing options...
speechles 1917 Posted January 28, 2016 Author Share Posted January 28, 2016 (edited) Sorry, good investigation but query.AddReplace is only responsible for building the query string that is then used for the request url to download the items. the order they appear in the url isn't going to matter. @@Luke But it does matter. Here are the changes to speed up the TV library screen ( https://github.com/MediaBrowser/Emby.Roku/pull/134 ). Notice it just changes the order of the query items. Indeed. This is why I said it shouldn't matter, same way you had. But it does. Try this yourself and see. Make 2 roku zips, one changed, and one not then test on your roku. One is quicker. I am not just making up things try it. Edit: Also get rid of all "screen.recreateOnActivate = true" in the filmography, movie, folder, and channel screens. Otherwise navigation using "back" on the remote triggers this redraw and slows the UI on back navigation. This screen already exists on back. This isnt required to get filters/sort to recreate when changed, this already recreates on change without that. This is why I hoped the tvscreen.brs would also have the recreateOnActivate but it didnt. This meant something else was slowing down that screen. Then I tried other ways to see why it was slow. Then epiphany came about. It was the query order, and aha. It does affect it. Let me know what you find. Thanks. https://github.com/MediaBrowser/Emby.Roku/pull/135 This one makes the TV screen have network, day of the week and airtime show where genre normally does. With the TV screen the genre is always empty. Now we can use that area. This makes it look live tv guide with that information showing. Edited January 29, 2016 by speechles 1 Link to comment Share on other sites More sharing options...
speechles 1917 Posted January 29, 2016 Author Share Posted January 29, 2016 (edited) @@Luke I found the root cause. At the level those are, for the top row of tv and movie. You cannot use "Imagetypelimit=1". For some reason if this happens, row0 will lock the entire screen until all of it can be displayed. You were right it wasnt just changing the order. On other views using the "Imagetypelimit=1" it helps to speed it up so its needed there. If you dont use it when you http get the upcoming row you get greeted with an http 400 error. Look for yourself. Moviescreen.brs doesnt have it. Seems just tvscreen.brs has it on row0 and that causes the issue. Sent from my Nexus 7 using Tapatalk Edited January 29, 2016 by speechles 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now