jurialmunkey / plugin.video.themoviedb.helper

GNU General Public License v3.0
200 stars 95 forks source link

The speed on the android devices is very slow #617

Closed Bequiet19 closed 2 years ago

Bequiet19 commented 2 years ago

First I would like to thank you for this great addon. I've been using it on my PC for a long time. However, it doesn't work properly on Android devices. Opening any list is sometimes a big torture. Waiting sometimes 20 seconds to open the list. Especially if I turn on to uses fanart images.................. I have tried on several android devices with different configurations and the same thing. Let's say some other addons open lists quickly, especially elementum that opens almost instantly. I know that the addons in python are not speed champions, but is there any chance that the opening lists on Android devices will speed up a bit. Thanks in advance.

matke-84 commented 2 years ago

@jurialmunkey You're reading my mind. I just wanted to write you the same thing (for original it is better be a bigger logo), but like I said, you're fast on the trigger. :-)

matke-84 commented 2 years ago

@jurialmunkey

This is fixable. I can filter these out because TMDb provides data about the language. It's how I determine landscape art (backdrop with iso_639_1 value), so I can just do the reverse for fanart (backdrop without iso_639_1 value).

This is a good idea for a fanart from TMDb. Some of them have a bunch of captions. For fanart it doesn't matter language.

Don't forget this.

jurialmunkey commented 2 years ago

@jurialmunkey

This is fixable. I can filter these out because TMDb provides data about the language. It's how I determine landscape art (backdrop with iso_639_1 value), so I can just do the reverse for fanart (backdrop without iso_639_1 value).

This is a good idea for a fanart from TMDb. Some of them have a bunch of captions. For fanart it doesn't matter language.

Don't forget this.

Should be done now. Will only work with extra details from TMDb enabled. Might need to refresh details of item if it is already cached.

matke-84 commented 2 years ago

Should be done now. Will only work with extra details from TMDb enabled. Might need to refresh details of item if it is already cached.

Yes. It works like a charm. Now we have almost perfect fanarts. Now I'm testing on android. And you know what? This all works very well. 😀 The only thing left is to try to speed up the entry in the lists (movies, tv shows, seasons...) on android devices. It's a little slower but this is such a bust compared to the old versions. I know this is going to be a little harder since there is a lot of metadata pulled by tmdb helper but we could think in the direction of making the same option like for fanarts, I don't know, I'm just thinking out loud.

EDIT: My mistake. There was something left in the background so it opened slowly. It actually opens the lists pretty ok. I measured an average speed is 5-6 seconds (real time seems to be two seconds longer) on android. Maybe another two or three seconds of acceleration and it would be perfect.

jurialmunkey commented 2 years ago

I need logs with timer reports to improve times further on Android - and ideally in lot of different scenarios with different settings. I don't own any android devices so it is impossible for me to tell what specific areas need optimisation and the only way I can find that out is from timer report logs.

Without more information I'm just stumbling around in the dark guessing at what might improve things.

Bequiet19 commented 2 years ago

Wooow. Great improvement. Now it seems to open even faster. A little more speed and it will be fantastic.

matke-84 commented 2 years ago

@jurialmunkey OK. I managed to extract the logs from the android. I tried as many different scenarios as possible. I have to say I installed kodi from scratch. I just installed one skin and tmdb helper that is conected with my trakt account. I don't have a lot of movies and tv shows on my trakt account so I don't know if it would slow down even more if I withdrew that information as well. We can say that this is an ideal scenario, I don't know how it would behave with multiple addons and skins installed. These are the results but it seems to me that in practice it opens a little slower, about two seconds is the difference if I measure with a stopwatch. The results are different, but some average is about 5 seconds per log, or about 6-7 seconds in reality. Some lists open slower and also widgets (although this is not so relevant, I just put it as an example). The log also includes the opening of seasons and episodes. If you need anything else, I'm here. https://paste.kodi.tv/devogixovu

jurialmunkey commented 2 years ago

Thanks @matke-84 that's exactly what I was looking for. There's a couple of outliers where the unusually longer times can be probably be ignored and blamed on external factors, but otherwise looks like some consistent trends about which areas need improvement and which don't.

Interesting to see TMDb details costing more than Fanarttv on Android now, as even with the recent improvements it's still generally the other way around for me on pc.

I've got a couple of ideas but might take a while to implement as it's a bigger change.

matke-84 commented 2 years ago

@jurialmunkey These are results with various settings. What is interesting when it enters in the list, everything now looks great and fast, but the process of entering in the list, seasons, episodes takes some time. I even noticed that even changing the quality settings does not change the situation of entering in the list too much.

jurialmunkey commented 2 years ago

@jurialmunkey These are results with various settings. What is interesting when it enters in the list, everything now looks great and fast, but the process of entering in the list, seasons, episodes takes some time. I even noticed that even changing the quality settings does not change the situation of entering in the list too much.

Yeah I've know for a while that seasons/episodes needs optimising. The current approach isn't particularly great in terms of efficiency for joining the parent tvshow details. But that's something I'll deal with once I get a little more performance out of the standard lists.

jurialmunkey commented 2 years ago

... the process of entering in the list, seasons, episodes takes some time.

@matke-84 - On the latest version you should see a decent improvement on season/episode list loading - at least I definitely am seeing improvements now.

matke-84 commented 2 years ago

@jurialmunkey There are litle improvements. After completely deleting cache season opens pretty ok while episodes i think same as before. I'll do a complete analysis tomorrow.

Bequiet19 commented 2 years ago

@jurialmunkey Unfortunately, I did not notice any improvement in opening speed. But that's why every switch from movie to movie works so nice.

jurialmunkey commented 2 years ago

@jurialmunkey Unfortunately, I did not notice any improvement in opening speed. But that's why every switch from movie to movie works so nice.

I wasn't talking about movies. I was specifically talking about going into the seasons or episodes list of a tvshow.

Bequiet19 commented 2 years ago

@jurialmunkey Yes, I'm sorry sir. I’m also talking about opening seasons and episodes. The opening of seasons and episodes is still late. Average about 5-6 seconds to open the season. Do I need to do something to speed up?

jurialmunkey commented 2 years ago

@jurialmunkey Yes, I'm sorry sir. I’m also talking about opening seasons and episodes. The opening of seasons and episodes is still late. Average about 5-6 seconds to open the season. Do I need to do something to speed up?

v4.5.40/41 had a bug where fanarttv lookups were being duplicated for episodes so you wouldn't have seen the benefit if you were using that version. Fixed in v4.5.42 so you should see a decent improvement opening episodes using that version.

I've also delayed writing disk cache until after directory is created in the hope that might improve performance on devices with slow disk write speeds.

Bequiet19 commented 2 years ago

@jurialmunkey I don't know, I don't see any acceleration. Maybe I'm doing something wrong. It seems to me a bit slower with the latest version.

jurialmunkey commented 2 years ago

@jurialmunkey I don't know, I don't see any acceleration. Maybe I'm doing something wrong. It seems to me a bit slower with the latest version.

I had to revert some changes due to an unexpected issue. https://github.com/jurialmunkey/plugin.video.themoviedb.helper/issues/640#issuecomment-1037078391

Bequiet19 commented 2 years ago

@jurialmunkey In the latest version, there are a some improvements in opening seasons and episodes. Is there any chance for movie and TV show lists to do the same?

matke-84 commented 2 years ago

@jurialmunkey I was thinking something. If we increase the number of connections to all services, would we get some speed improvement?

jurialmunkey commented 2 years ago

@jurialmunkey I was thinking something. If we increase the number of connections to all services, would we get some speed improvement?

What do you mean by increase the number of connections? Each item in the list is already given it's own thread for API requests.

matke-84 commented 2 years ago

@jurialmunkey I thought that if increased number of connections , that can we number of incoming/outgoing requests could also increase, but I didn't know that it was determined by api. Sorry my bad.

jurialmunkey commented 2 years ago

@jurialmunkey I thought that if increased number of connections , that can we number of incoming/outgoing requests could also increase, but I didn't know that it was determined by api. Sorry my bad.

Every request happens as its own thread with its own connection.

For instance, see this timer report

DIRECTORY TIMER REPORT
info=popular&page=6&plugin_category=Popular%20Movies&tmdb_id=None&tmdb_type=movie
------------------------------
get_list       :   0.455 sec
 - kodi_db     :   0.007 sec
add_items      :   1.825 sec
--build        :   1.742 sec
 - item_api    :   1.644 sec avg |   1.723 sec max |  20
 - item_ftv    :   1.615 sec avg |   1.699 sec max |  20
 - item_tmdb   :   0.549 sec avg |   0.779 sec max |  19
--make         :   0.075 sec
------------------------------
Total          :   2.280 sec

To create this list, there were 20 requests to FanartTV taking an average of 1.615s per request, and 19 requests to TMDb taking an average of 0.549s per request. To do these 39 requests one at a time would take 42.731s. However, we can see from the --build time that due to threading it only took 1.742s total to get ALL 39 of those requests AND also do the computation to build all 20 items.

That total time is only 0.043s longer than the longest FanartTV request of 1.699s. That means even if all the other items were already cached and we only needed to do that one single request to FanartTV, it would still take 1.699s whilst we waited for FanartTV to send the data.

There is practically no optimisation available here - we cannot go faster than it takes the FanartTV server to send the data.

From the above, we can see that the only non api based cost involved was 0.075s finalising the items and sending to Kodi plugin directory (--make), the 0.007s getting the Kodi db from cache, and the 0.043s remainder in the build section. That's a grand total of 0.125s doing pure computation tasks that don't involve waiting for APIs. That is a trivial number.

matke-84 commented 2 years ago

@jurialmunkey With the latest update landscape season specific artworks don't work. Instead of a landscape image of the season, it shows me a landscape image of the whole tv show.

matke-84 commented 2 years ago

@jurialmunkey I thought that if increased number of connections , that can we number of incoming/outgoing requests could also increase, but I didn't know that it was determined by api. Sorry my bad.

Every request happens as its own thread with its own connection.

For instance, see this timer report

DIRECTORY TIMER REPORT
info=popular&page=6&plugin_category=Popular%20Movies&tmdb_id=None&tmdb_type=movie
------------------------------
get_list       :   0.455 sec
 - kodi_db     :   0.007 sec
add_items      :   1.825 sec
--build        :   1.742 sec
 - item_api    :   1.644 sec avg |   1.723 sec max |  20
 - item_ftv    :   1.615 sec avg |   1.699 sec max |  20
 - item_tmdb   :   0.549 sec avg |   0.779 sec max |  19
--make         :   0.075 sec
------------------------------
Total          :   2.280 sec

To create this list, there were 20 requests to FanartTV taking an average of 1.615s per request, and 19 requests to TMDb taking an average of 0.549s per request. To do these 39 requests one at a time would take 42.731s. However, we can see from the --build time that due to threading it only took 1.742s total to get ALL 39 of those requests AND also do the computation to build all 20 items.

That total time is only 0.043s longer than the longest FanartTV request of 1.699s. That means even if all the other items were already cached and we only needed to do that one single request to FanartTV, it would still take 1.699s whilst we waited for FanartTV to send the data.

There is practically no optimisation available here - we cannot go faster than it takes the FanartTV server to send the data.

From the above, we can see that the only non api based cost involved was 0.075s finalising the items and sending to Kodi plugin directory (--make), the 0.007s getting the Kodi db from cache, and the 0.043s remainder in the build section. That's a grand total of 0.125s doing pure computation tasks that don't involve waiting for APIs. That is a trivial number.

I see. Truly a negligible difference.

jurialmunkey commented 2 years ago

@jurialmunkey With the latest update landscape season specific artworks don't work. Instead of a landscape image of the season, it shows me a landscape image of the whole tv show.

Should be fixed now.

matke-84 commented 2 years ago

@jurialmunkey It works. 👍 I tried this addon that mention @Bequiet19, Fen, I've never heard of it before but it opens lists really fast in a fact. I guess it pulls less metadata but I didn't notice that something was missing also artworks are also included. But what is not clear to me, how managed to open seasons and episodes instantly, without a second of waiting. Does it pull this metadata and put it somewhere in cache when opening the lists, but in other hand it is not possible for me because open list very quickly. I know that tmdb helper and this addon are not comparable but maybe we can find some solution here as well.

jurialmunkey commented 2 years ago

I guess it pulls less metadata but I didn't notice that something was missing also artworks are also included. But what is not clear to me, how managed to open seasons and episodes instantly, without a second of waiting. Does it pull this metadata and put it somewhere in cache when opening the lists, but in other hand it is not possible for me because open list very quickly. I know that tmdb helper and this addon are not comparable but maybe we can find some solution here as well.

It's not a fair comparison. It's like comparing a motorbike with a truck and asking if there's something the motorbike is doing to make it go faster than the truck.

Fen's fanarttv implementation is fast because it is incredibly simplistic. And that's because Fen only needs the data for one thing: providing a list of items. Plus, it doesn't look up season specific artwork or allow manual selection.

And on the metadata front, you might not notice it as an end user but you are only using a very small subset of the features that TMDbH provides. TMDbH's first role is a skinning tool, so it gives far richer metadata. See the detailed item wiki for examples https://github.com/jurialmunkey/plugin.video.themoviedb.helper/wiki/Detailed-Item

As a simple example, I guaranteed Fen cannot give you ListItem.Property(sound_department.1.name) or ListItem.Property(photography.1.name). The rich metadata in TMDbH is important for skinners who want to do complex filtering to create related lists - for instance, say I want a list of all other movies with the same director of photography in the same genre - TMDbH provides tools for skinners to do that.

matke-84 commented 2 years ago

@jurialmunkey I said that these two addons are not comparable. I didn't even compare them, tmdb helper is most complex addon, with much more metadata and functionality. But let’s say elementum that’s done in go, which is very fast, and I believe it’s nothing much more complex than Fen, doesn’t open seasons and episodes instantly like a Fen. That was weird to me. So I was wondering if there might be in code something specifically that what we can use, nothing else.

matke-84 commented 2 years ago

@jurialmunkey With the latest update, we lost the ability to choose a fanart background from fanart.tv in artwork manager.

Bequiet19 commented 2 years ago

@jurialmunkey It seems to me that the lists open a little slower again compared to the previous version I used (I think version 4.5.68). Now it opens the lists again in about 6-7 seconds. Only if we could go down to 3-4 seconds would it be perfect. I really hope so sir. Everything else is great. Fast switching between movies, artwoks...

jurialmunkey commented 2 years ago

@jurialmunkey It seems to me that the lists open a little slower again compared to the previous version I used (I think version 4.5.68). Now it opens the lists again in about 6-7 seconds. Only if we could go down to 3-4 seconds would it be perfect. I really hope so sir. Everything else is great. Fast switching between movies, artwoks...

Please provide timer logs otherwise I cannot help you. I need the timer log data to be able to identify the issue

xyzfre commented 2 years ago

I'm sorry not to be disrespectful but I don't think two seconds make a big difference TMDb runs great to mess something up just to increase two or three seconds on my end it's not worth it,, TMDb works amazingly well already thank you for all the hard work that goes into this project

Bequiet19 commented 2 years ago

@

@jurialmunkey It seems to me that the lists open a little slower again compared to the previous version I used (I think version 4.5.68). Now it opens the lists again in about 6-7 seconds. Only if we could go down to 3-4 seconds would it be perfect. I really hope so sir. Everything else is great. Fast switching between movies, artwoks...

Please provide timer logs otherwise I cannot help you. I need the timer log data to be able to identify the issue

DIRECTORY TIMER REPORT
                                                   info=trakt_popular&tmdb_type=movie
                                                   ------------------------------
                                                   idx_lookup     :   0.018 sec
                                                   get_list       :   1.692 sec
                                                    - kodi_db     :   None
                                                   add_items      :   4.491 sec
                                                   --build        :   3.961 sec
                                                    - item_api    :   2.991 sec avg |   3.695 sec max |  20
                                                    - item_ftv    :   1.651 sec avg |   2.577 sec max |  20
                                                    - item_tmdb   :   2.678 sec avg |   3.489 sec max |  20
                                                   --make         :   0.467 sec
                                                   ------------------------------
                                                   Total          :   6.185 sec

                                                   item_api:
                                                   1.936  2.194  2.382  3.018  3.046  2.922  3.059  3.061  3.177  3.184  3.194  2.564  3.154  3.608  3.695  3.053  3.031  3.624  2.908  3.006 

                                                   item_ftv:
                                                   1.082  1.121  1.176  1.231  1.289  1.385  1.396  1.305  1.508  0.976  1.636  1.485  2.108  1.909  2.474  1.803  2.259  2.192  2.116  2.577 

                                                   item_tmdb:
                                                   1.749  1.952  2.186  2.447  2.595  2.633  2.768  2.602  2.856  3.004  3.037  2.349  2.531  3.162  3.489  2.803  2.743  2.564  3.405  2.677 

This is average. Sometimes it's more.

jurialmunkey commented 2 years ago

@Bequiet19 - That's just slow internet connection and/or slow server response times.

In the get_list line you can see it took 1.692 sec to receive the list data back from the TMDb server. And that's before we can even start looking up item details.

In the item_tmdb line you can see that the longest item details request took 3.489 sec for the data to come back from TMDb. That means at very minimum, we would need to wait 5.181 sec for the data (time for list + longest item).

The total line shows that the entire directory only took 6.185s. That's a mere 1.004s on top of the slowest request to do 40 additional requests (1xTrakt, 20xFanartTV, plus the 19x other item details from TMDb) plus process the data.

This is why the timer reports are important. I can't make the internet go faster. If the server is slow, the server is slow.

Bequiet19 commented 2 years ago

@jurialmunkey I read that tmdb helper has more data that it downloads from the server and cannot be compared to any other addon which open lists almost immediately because of their simplicity. Is there a possibility to make an option that would give the end user the opportunity to choose what he needs, not to burden the Internet or the device with unnecessary data. Then I guess we would gain in speeding up opening lists? Sorry if I ask stupid questions, I don't understand much about python programming. I would just like to use tmdb helper on android with similar experience as on computer because this is one of my favorite addons. :-)

matke-84 commented 2 years ago

@jurialmunkey I read that tmdb helper has more data that it downloads from the server and cannot be compared to any other addon which open lists almost immediately because of their simplicity. Is there a possibility to make an option that would give the end user the opportunity to choose what he needs, not to burden the Internet or the device with unnecessary data. Then I guess we would gain in speeding up opening lists? Sorry if I ask stupid questions, I don't understand much about python programming. I would just like to use tmdb helper on android with similar experience as on computer because this is one of my favorite addons. :-)

I'm not really sure if this is possible but you will get an answer from @jurialmunkey. What I want to advise you is to try to delete all cache (tmdb helper and kodi), thumbs... and then reset the device. Android devices know that they sometimes slow down due to accumulated cache and lack of space.

jurialmunkey commented 2 years ago

@jurialmunkey I read that tmdb helper has more data that it downloads from the server and cannot be compared to any other addon which open lists almost immediately because of their simplicity. Is there a possibility to make an option that would give the end user the opportunity to choose what he needs, not to burden the Internet or the device with unnecessary data. Then I guess we would gain in speeding up opening lists? Sorry if I ask stupid questions, I don't understand much about python programming. I would just like to use tmdb helper on android with similar experience as on computer because this is one of my favorite addons. :-)

There are already options to turn off FanartTV, TMDb extra details, and Trakt watched data. I have told you that right from the very start.

Regardless, the requests size will only be a few kilobytes because it is compressed plain text. For instance, the full data for Alien (1979) is ~13kb (13298 bytes to be exact) of compressed data (it decompresses to 94kb). Even on ADSL that'd be under 0.02s to download. The data size is trivial - reducing it from 13Kb to 10Kb isn't noticeable.

The time impact is server response time (basically ping speed). The server can only server so many users at a time. If there's high demand, the wait time in the queue to ask for the data is longer (just like being on hold on the phone). If the queue gets long then TMDb starts rate limiting users. Once you hit the rate limit you get pushed back in the queue.

The get_list stage gives a good indication of how long TMDb is taking to respond because there's not much else TMDbHelper can do until it gets the lists data. A normal time is between 0.4 to 0.8s. That you're getting 1.6s indicates high server load (or a bad internet connection or other services locking the cpu) causing poor times rather than TMDbHelper.

To demonstrate: See below for two pages from the same list on the same machine with cache deleted. The machine is an i7 with SSD and 32gb ram, so we know we aren't being impacted by poor CPU performance. You can see the first one I open the page in 1.8s whereas the second blew out to almost 5s.

On the first, my get_list time was only 0.410s and my request max never went over 1.400s. These are normal response times. As a result, the list was fast to open with 1.871s

In the second, you can see my get_list time was more than double at 0.894s and one of my TMDb requests maxed out at 3.730s. These are much slower response times than normal. Clearly there was some network/server congestion and as a result, that particular page took way longer to load -- almost 5 seconds.

DIRECTORY TIMER REPORT
info=popular&page=6&plugin_category=Popular%20Movies&tmdb_id=None&tmdb_type=movie
------------------------------
idx_lookup     :   0.002 sec
get_list       :   0.410 sec
 - kodi_db     :   0.008 sec
add_items      :   1.460 sec
--build        :   1.369 sec
 - item_api    :   1.010 sec avg |   1.368 sec max |  20
 - item_ftv    :   0.983 sec avg |   1.079 sec max |  20
 - item_tmdb   :   0.635 sec avg |   1.364 sec max |  20
--make         :   0.086 sec
------------------------------
Total          :   1.871 sec
DIRECTORY TIMER REPORT
info=popular&page=3&plugin_category=Popular%20Movies&tmdb_id=None&tmdb_type=movie
------------------------------
idx_lookup     :   0.003 sec
get_list       :   0.894 sec
 - kodi_db     :   0.009 sec
add_items      :   4.049 sec
--build        :   3.836 sec
 - item_api    :   1.150 sec avg |   3.751 sec max |  20
 - item_ftv    :   1.005 sec avg |   1.091 sec max |  20
 - item_tmdb   :   0.795 sec avg |   3.730 sec max |  17
--make         :   0.205 sec
------------------------------
Total          :   4.944 sec
matke-84 commented 2 years ago

There has been a big drop in performance. It opens lists very slowly. Here's the log.


                                               get_list       :   0.252 sec
                                               add_items      :   8.933 sec
                                               --build        :   8.554 sec
                                                - item_api    :   6.898 sec avg |   8.531 sec max |  19
                                                - item_ftv    :   7.446 sec avg |   7.937 sec max |  16
                                                - item_tmdb   :   7.737 sec avg |   8.200 sec max |  16
                                               --make         :   0.344 sec
                                               ------------------------------
                                               Total          :   9.186 sec

                                               item_api:
                                               0.057  0.093  0.092  7.696  7.837  8.024  8.051  8.031  8.070  8.078  8.112  8.116  8.074  8.330  8.489  8.483  8.531  8.384  8.509 

                                               item_ftv:
                                               6.885  7.061  7.040  7.107  7.183  7.203  7.285  7.367  7.553  7.633  7.681  7.648  7.749  7.887  7.920  7.937 

                                               item_tmdb:
                                               7.091  7.212  7.377  7.445  7.526  7.534  7.708  7.713  7.758  7.806  7.941  8.141  8.064  8.155  8.115  8.200

                                               get_list       :   0.230 sec
                                               add_items      :   6.329 sec
                                               --build        :   5.579 sec
                                                - item_api    :   4.405 sec avg |   5.566 sec max |  19
                                                - item_ftv    :   4.435 sec avg |   5.166 sec max |  16
                                                - item_tmdb   :   4.784 sec avg |   5.351 sec max |  16
                                               --make         :   0.709 sec
                                               ------------------------------
                                               Total          :   6.560 sec

                                               item_api:
                                               0.104  0.110  0.112  4.434  4.756  5.001  5.064  5.077  5.121  5.141  5.147  5.230  5.319  5.390  5.492  5.529  5.537  5.566  5.565 

                                               item_ftv:
                                               3.941  3.893  3.932  4.084  4.075  4.216  4.255  4.320  4.464  4.538  4.666  4.644  4.896  4.927  4.950  5.166 

                                               item_tmdb:
                                               3.750  4.083  4.423  4.478  4.558  4.700  4.725  4.568  4.882  4.892  5.085  5.195  5.250  5.351  5.296  5.314

                                               get_list       :   0.155 sec
                                               add_items      :  14.300 sec
                                               --build        :  13.726 sec
                                                - item_api    :  13.130 sec avg |  13.715 sec max |  20
                                                - item_ftv    :  10.408 sec avg |  13.241 sec max |  24
                                                - item_tmdb   :  12.611 sec avg |  13.463 sec max |  20
                                               --make         :   0.547 sec
                                               ------------------------------
                                               Total          :  14.457 sec

                                               item_api:
                                               12.217  12.255  12.854  12.887  12.908  12.968  12.982  13.055  13.066  13.102  13.172  13.247  13.274  13.309  13.331  13.416  13.506  13.633  13.710  13.715 

                                               item_ftv:
                                               11.220  11.540  11.599  11.961  11.882  12.045  12.143  12.378  12.417  0.110  12.718  12.651  12.708  0.139  0.069  0.059  12.839  12.911  12.989  12.906  13.022  13.109  13.125  13.241 

                                               item_tmdb:
                                               11.777  11.779  11.991  12.029  12.078  12.162  12.425  12.433  12.496  12.438  12.539  12.683  12.873  12.857  13.050  13.165  13.186  13.329  13.463  13.461

                                               get_list       :   0.111 sec
                                               add_items      :   9.623 sec
                                               --build        :   9.215 sec
                                                - item_api    :   8.393 sec avg |   9.206 sec max |  20
                                                - item_ftv    :   7.756 sec avg |   8.974 sec max |  20
                                                - item_tmdb   :   8.527 sec avg |   9.054 sec max |  19
                                               --make         :   0.373 sec
                                               ------------------------------
                                               Total          :   9.736 sec

                                               item_api:
                                               0.060  8.154  8.203  8.191  8.540  8.563  8.611  8.684  8.804  8.868  9.038  9.074  9.056  9.077  9.076  9.089  9.192  9.169  9.200  9.206 

                                               item_ftv:
                                               7.326  7.455  7.562  7.591  7.609  7.551  7.871  7.973  8.078  8.072  8.347  8.358  8.475  0.062  8.702  8.731  8.683  8.800  8.907  8.974 

                                               item_tmdb:
                                               7.921  7.947  8.068  8.182  8.072  8.252  8.433  8.487  8.411  8.527  8.466  8.810  8.714  8.854  8.904  8.876  8.984  9.054  9.045

                                               get_list       :   0.953 sec
                                               add_items      :  18.800 sec
                                               --build        :  18.336 sec
                                                - item_api    :  16.679 sec avg |  18.295 sec max |  20
                                                - item_ftv    :  15.000 sec avg |  16.583 sec max |  20
                                                - item_tmdb   :  16.095 sec avg |  16.707 sec max |  19
                                               --make         :   0.391 sec
                                               ------------------------------
                                               Total          :  19.805 sec

                                               item_api:
                                               0.106  17.118  16.787  17.502  17.333  17.253  16.992  17.901  17.373  17.782  17.208  17.694  17.464  17.445  17.994  18.209  17.476  18.295  17.679  17.970 

                                               item_ftv:
                                               15.210  15.226  15.047  15.402  15.374  15.366  15.512  15.584  15.731  15.572  16.160  16.181  16.190  16.017  15.988  16.108  16.129  16.583  0.116  16.502 

                                               item_tmdb:
                                               15.331  15.665  15.424  15.726  15.616  15.879  15.912  15.912  15.935  16.279  16.650  16.178  16.593  16.171  16.209  16.478  16.689  16.449  16.707
matke-84 commented 2 years ago

@jurialmunkey Now everything is ok again. I don't know what happened. I tried to clear cache, reset kodi... and suddenly everything went back to normal.

jurialmunkey commented 2 years ago

@jurialmunkey Now everything is ok again. I don't know what happened. I tried to clear cache, reset kodi... and suddenly everything went back to normal.

Looks like you had just had a slow internet/network connection for a while. Nothing has changed on the item builder front.

"item-ftv" only times how long it takes to check the cache and do a look from fanarttv if the item doesn't exist. So a slow time in that section pretty much can only mean a slow internet connection (if it was a disk issue you'd get an error about the database being locked).

matke-84 commented 2 years ago

@jurialmunkey It's not up to internet speed. It is up to the skin helper service, more precisely metadatautils module. After the last change tmdb helper slowed down a lot. Something about multiprocessing and android has been deleted. https://github.com/kodi-community-addons/script.module.metadatautils/commit/00c3af7bf48d7f5062598c9a1cae1ead9cfe3c8d When I return the version without this change, everything works normally.

jurialmunkey commented 2 years ago

@matke-84 - I don't use metadatautils module and I don't use multiprocessing. Neither of those things have anything to do with TMDbH.

If some other addon is messing with your internet connection speed then I suggest you remove it.

matke-84 commented 2 years ago

@jurialmunkey You didn't understand me. I didn't say that there was anything with tmdb helper, I said that it was to metadatautils, and I have to use it because it is necessary for my skin. I just mentioned it kills performance, among other things, and tmdb helpers. That's why the slowdown happened. This has nothing to do with you and tmdb helper. ;-)

jurialmunkey commented 2 years ago

@jurialmunkey You didn't understand me. I didn't say that there was anything with tmdb helper, I said that it was to metadatautils, and I have to use it because it is necessary for my skin. I just mentioned it kills performance, among other things, and tmdb helpers. That's why the slowdown happened. This has nothing to do with you and tmdb helper. ;-)

Ah, I see what you're saying! Interesting that it would cause such a performance hit to other add-ons not using it - it must be completely maxing out the cpu.