bigretromike / nakamori

Nakamori is Kodi addon that use Shoko (known as Japanese Media Manager (JMM)) Server as back-end for metadata information.
https://shokunin.monogatari.pl/nakamori/
49 stars 5 forks source link

Very slow to load series #83

Closed kaigame closed 8 years ago

kaigame commented 8 years ago

When selecting a series with a lot of episodes (tried bleach, naruto, one piece, etc) it is very slow to display the episode list.

Is there anyway to reduce the amount of per episode information being pulled at once, from previous issues there is a lot of additional information being grabbed.

da3dsoul commented 8 years ago

Unfortunately, with the way Kodi works, all information like plot, Genre, etc. Is required before it'll show a list, and doesn't give the option to request it later. We could include a setting to truncate information on large shows.

da3dsoul commented 8 years ago

Even still, if the lag there is between JMM and Nakamori communication, there is no helping it, as it's already very streamlined

bigretromike commented 8 years ago

@kaigame I already cut alot of redundant info about series. In series like bleach i think it was something along from 50mb of data i cut it to 1-3mb if I recall correctly. The loading is main because: JMM push data and parse it as XML, JMM Kodi Service push it into Kodi, Kodi parse it to List and fill all the info, Kodi download needed arts/pictures. The only 'workaround' for those would be: option to disable getting info about shows OR make JMM send first 10-20 episode to kodi. The second option would add another list before episode with pick range of episode you are interested. This could be a thing. Also there is some overhead because I added characters/actors even when Kodi dont fully support adding them via addon - but thats something for future. I also notice the load time, and making option two would solve long time to make watch mark for long series... will consider it and talk about it with jmm staff.

bigretromike commented 8 years ago

84 this is only semi solution on Nakamori/Kodi side, because anyway JMM still parse and send big chunk of data which Kodi still must recieve - does skip on the last step will help, who knows but still its solid code. I will probably work on the solution on JMM side in near future.

da3dsoul commented 8 years ago

Okay, I'm going to start discussing how to optimize the JMM side here, as I don't feel like making another issue for it.

  1. Move the description filtering to JMM side
  2. for the key only send http://127.0.0.1:8111/JMMServerKodi/GetMetadata/1/ 2/321 this part of it, as we just reconstruct the link with ip, port, and user.
  3. For thumbs http://127.0.0.1:8111/JMMServerREST/GetThumb/ 1/11053/0.6667 we know it's a thumbnail when we request it. For Images http://127.0.0.1:8111/JMMServerREST/GetImage/ 7/2108

For a test xml I dumped of a group filter. Before this it is 23333 bytes. After it is 20425. Not amazing, but it is about 12.5% cut off, without losing any functionality that is there.

If we make it so that jmmepisodeid is only sent for episodes: 20136, about 13.75% cut.

For episodes: I used a dump of concrete revolutio

All of the above +

  1. http://127.0.0.1:8112/videolocal/0/ 1302 /file.mkv cut to down to the file id
  2. only send tags once

takes it from 48456 to 35117 without losing any functionality. That's a 27.5% drop on a 13 episode show.

And that's before we even start talking about dropping information that's unneeded or config.

bigretromike commented 8 years ago

ok, I understand that. You want to cut url part that is well-known. This is good idea, it would be easy to make nakamori both version compatible with checking if thumb contains info about server or not. This could be problematic when jmm author with change api space names, but I doubt it will be soon and we can always adapt those names.

da3dsoul commented 8 years ago

All of these could be easily backwards compatible!

da3dsoul commented 8 years ago

I am almost done with the JMM side already, these are really simple. Making Nakamori backwards compatible will be harder, but only slightly, as it's an if statement

da3dsoul commented 8 years ago

We can clip the parent info (thumb, fanart, Title) from all but one as well.

da3dsoul commented 8 years ago

We can cut out the Date Updated (not added) info entirely. Kodi doesn't have any way to use it. What do you think about removing the time of day from the date added, or removing date added entirely. You can still make Filters based on it. Kodi can display that, but the only reason I can think of to have it is for a recently added list.

da3dsoul commented 8 years ago

We don't really need the romaji Title for episodes, unless we add a way to display it instead of English. I'm fine with either. I have a strict "Don't send anything we don't need over network" policy. If we don't use it, remove it, if we don't want to remove it, then use it. I would be rather keen on an option to display romaji episode titles, so that is a possibility.

kaigame commented 8 years ago

I'm sure there are people out there who would like the choice of title selection. Would it be possible to only load one or the other, cutting the data pulled?

Happy to test anything you want to throw my way. On 16 May 2016 22:44, "da3dsoul" notifications@github.com wrote:

We don't really need the romaji Title for episodes, unless we add a way to display it instead of English. I'm fine with either. I have a strict "Don't send anything we don't need over network" policy. If we don't use it, remove it, if we don't want to remove it, then use it. I would be rather keen on an option to display romaji episode titles, so that is a possibility.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/bigretromike/nakamori/issues/83#issuecomment-219557814

da3dsoul commented 8 years ago

At this point, we are talking about what we can cut regardless of scenario. Hopefully the end game will involve only sending the data requested, rather than everything we could possibly need

da3dsoul commented 8 years ago

You can take the develop branch and throw the whole thing in a zip and Kodi will load it as a plugin

da3dsoul commented 8 years ago

Kodi compiles it on demand

kaigame commented 8 years ago

will do, thanks for the tip

On 16 May 2016 at 23:09, da3dsoul notifications@github.com wrote:

Kodi compiles it on demand

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/bigretromike/nakamori/issues/83#issuecomment-219563639

da3dsoul commented 8 years ago

This will be fixed in maxpiva's JMM updates

bigretromike commented 8 years ago

Slow loading should be fix'd in JMM3.6 - as its not official stable we will wait with it

da3dsoul commented 8 years ago

It's much better, I've not had more than a few seconds loading from local.

bigretromike commented 8 years ago

yes. we can close this as last commit (without proper index) sort alot of 'waiting for gui' issues and speed things up also