Kodi Community Forum
Req Queue communication threads - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: Req Queue communication threads (/showthread.php?tid=328902)

Pages: 1 2


Queue communication threads - HeresJohnny - 2018-02-24

I'm using Kodi with MySQL/MariaDB. When it starts up, it sends an SQL query over the LAN. However, there are are several other communication requests which are being launched at the same time, i.e. scraping for new files, add-on updates and other requests by add-ons.

This usually leads to initial congestion and slows down the first thing that should be happening by a good degree: loading of items into the skin. Also the latest versions of MySQL are not doing a good job of queueing queries and avoiding locks. The more stuff is happening simultanously, the more like Kodi is to become seemingly unresponsive. (MariaDB does a much better job in that regard)

If it's technically possible I would propose a mechanism of deferring network communication.

First, the initial database query for all skin menu items should finish so all movie, tv and music items are loaded.
Next, if initial scraping is enabled that should run and finish.
Only then should any add-on related network traffic start.


Queue communication threads - Memphiz - 2018-02-24

That small bit of traffic which is generated at start up can’t be a problem really. Are you sure that you really found the root cause of your issues here?


RE: Queue communication threads - HeresJohnny - 2018-02-24

Who said I have issues? My ex-wife maybe..
Anyway, if no scraping is activated, items load in under 10 secs.
If scraping starts at the same time, loading time is at least doubled.
Then there are lots of add-on that open network traffic, like rating updates, subtitle cleaning definitions, next up notifications etc etc. Everything by itself may be a small amount of traffic, all at once may have a detrimental effect. That would be especially true when some of those updates also want to access the database.


RE: Queue communication threads - nickr - 2018-02-25

Why on earth would you update library at every startup?


RE: Queue communication threads - HeresJohnny - 2018-02-25

New TV shows every day? What is it with the aggressive tone in this forum?


RE: Queue communication threads - tjay260476 - 2018-02-25

New TV shows everyday doesn’t sound like local content now does it.... and as you’ve joined in 2011, you should have read https://forum.kodi.tv/showthread.php?tid=119117 and https://kodi.wiki/view/Forum_rules also explains the ‘aggressive tone’ too...


RE: Queue communication threads - nickr - 2018-02-25

Putting aside the legality of new TV show every day, most download software can be configured to tell kodi to add the download to the library.


RE: Queue communication threads - HeresJohnny - 2018-02-25

I have absolutely no clue why I would have to be reprimanded in any way or where I convey that I was referring to local content.

In any number of threads TV shows are the subject of questions, like proper naming of episodes.

None of your answers are on topic or helpful. I must conclude that this forum has become toxic and that all that's on your mind is a witch hunt for piracy, real or imagined.

I refuse to be stigmatized and be subjected to this kind of behavior. Don't quote the rules to me if you yourselves can't be examples of courtesy.

I have no further interest in making any suggestions.


RE: Queue communication threads - Karellen - 2018-02-25

I think the problem is your initial post. Your first post does read as if you are experiencing problems. As a result of the wording of your first post, others have offered suggestions or queried the cause of the problem.

If you are not having issues, then why would you suggest such major changes to Kodi? One that would require more than a few minutes to modify. Do you think the developers have nothing better to do? And if you are able to delve this deeply into the inner workings, then why not contribute?

I am not sure what your comment in post #5 regarding TV Shows is directed at. Nobody mentioned TV Shows... you did in that post.

Nobody has reprimanded you, rather you have become extremely defensive, and a bit agressive to the other contributors.

Maybe re-read your thread without emotion.


RE: Queue communication threads - nickr - 2018-02-25

Nobody has reprimanded you, but I have to say, maybe your ex-wife was right.

All you have had is:

1. a senior developer saying "the amount of traffic should not be an issue"

2. me asking why you would scan on every kodi startup.

3. You replying that it is because of "new tv shows every day"

4. tjay thought that might mean you are pirating (after all, there are not many tv series that are 'free' to download legitimately. Then again maybe you are ripping your blurays or dvds over a period of time, hard to say.)

5. me giving you a solution/suggestion (despite the implications drawn by tjay).

6. You getting grumpy.

Yes we do not support piracy, because that is not the rep we want Kodi to have. If you don't like that, tough luck.


RE: Queue communication threads - da-anda - 2018-02-25

Quote:First, the initial database query for all skin menu items should finish so all movie, tv and music items are loaded.
Next, if initial scraping is enabled that should run and finish.
Only then should any add-on related network traffic start.
We are aware that our threading needs to be improved, especially because right now it's possible for background tasks to lock the UI. We are working on it, but it's not an easy fix, because we have to untangle all the core components of Kodi which grew over a large period of time into this tangled "mess".
But apart from this, think about your suggestion again, but from the perspective of other usecases than yours. Like some users like to instantly start Kodi in fullscreen LiveTV. With your suggestion, PVR would be blocked until scraping was finished. Also any add-on would not work unless scraping is finished. But what if you don't care about the library update on startup and only want it to be auto-updated in general at some point? Also imagine somebody buying and ripping a new season of his favourit show, or ripping large chunks of his music collection, then on next startup you'd have to wait for ages (especially on low powered platforms) for the scraping to finish before you could use any add-on. I don't think this would be a good user experience. If priorities have to be changed, then in a way that the library update has the lowest priority of all.


RE: Queue communication threads - tjay260476 - 2018-02-25

The problem is this, (and this is my justification of my last post)

Team Kodi, and passionate users like myself who use Kodi for it's intended reason get very, very jumpy at threads that say things like 'new TV Shows every day'. When the software you love, support and develop  is being muddied by media, box sellers and Youtubers, you can see then why you get posts like mine that say things about piracy and read the forum rules. 

It is not a dig at you personally, just look at the garbage bin and see how large the problem is, what I would suggest is be mindful of how you post, so that it doesn't get misinterpreted by Team Kodi or passionate users.

Please don't see this as having a go, I am just showing you why we seem to be on the defensive.


RE: Queue communication threads - DJ_Izumi - 2018-02-25

It's one thing to refuse to offer support Kodi installs with banned addons installed, but don't you guys think it's going too far when Kodi devs are borderline interrogating users as to the nature of the media files available in their local storage and making judgements based on their imagined origins?


Queue communication threads - Memphiz - 2018-02-26

Don‘t you think developers are human? We are full of anger and annoyance about the whole shitty situation. While you are right that we are on the edge sometimes i for myself still totally understand where this comes from. Sorry that some sane users are in the middle of this from time to time - but most of the time we are really good in spotting those that didn‘t read the forum rules - if you know what i mean...


RE: Queue communication threads - HeresJohnny - 2018-02-26

@da-anda Yours is the post I would have expected from the start. I merely wanted to present an abstract of what could be improved. I am somewhat proficient in databases but I don't know all the inner workings of Kodi.

Your counter arguments make a lot of sense. Still, since initial scraping is an obvious option, that will be how most users update their library. I might look into other ways, but that is an advanced topic which I would consider a workaround.

I would like to finish that I consider Kodi far from unresponsive but there's always room for improvement 😀.