Posts: 62
Joined: Mar 2011
Reputation:
6
There won't be in your queries. The issue with cast is related to other addons and what they request. Eg if you included cast, streamdetails, tag or showlink, you'd find that a query for the cast would fire. In fact any of them triggers the inclusion of the others.
I guess what it comes down to is my expectation of the queries thrown at JSON should turn into the minimum amount of work to get that result. At times they're not, I suspect it's because most APIs want the full objects.
As for individual PRs I suspect some parts will break up ok, but some bits will have dependencies on each other.
I also don't know what the scope is for some of these changes at this stage of development. 13.0 is heading for beta, so I guess smaller scoped items may stand a better chance. Of course that means more fun with git, and how to get branches with just the right set of changes in...
Posts: 5,184
Joined: Jan 2009
Reputation:
131
Yes you are right, it simply grabs all the extra information if one of the extra properties is requested. That's because that's how it works internally and nobody wanted to dig into it any deeper.
I'd also recommend splitting your work into separate PRs even if some things depend on others. Otherwise it will be a lot more difficult to get your work into mainline. If someone doesn't like a part of your implementation it will block your whole work which you can avoid by doing separate PRs. If you have any git questions feel free to send me a message.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.
Posts: 17,855
Joined: Jan 2011
Reputation:
1,055
Milhouse
Retired Team-Kodi Member
Posts: 17,855
2014-03-01, 21:44
(This post was last modified: 2014-03-01, 21:49 by Milhouse.)
One word of caution when using PR4301 - if applying a mass of updates (ie. imdb rating and votes) via JSON while the user is sat in the movie library view, the Pi will run out of memory and appear to hang. I've got swap enabled, otherwise XBMC would probably crash due to OOM, however it's likely that if I let this run for long enough it would use all my swap too (it's already using 88% of 128MB swap on a 512MB Pi, with 256MB physical RAM and 256MB for GPU).
If the user isn't in the library view (ie. sat at the home menu), then there is no problem when applying the same updates - hardly any memory is used at all.
In my case when applying 320 updates remotely from a PC with the Pi as the client and the user viewing the Movies library view (thumbnails, stock Confluence), the Pi will stop responding after about item 215, with all physical memory exhausted and swap memory increasingly used.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Posts: 62
Joined: Mar 2011
Reputation:
6
Hmm, is that a bug somewhere in what I've done? Or that the slow code is unintentionally throttling the update events?
320 movies in 25s is 13 updates a second.
320 movies in 36m is 1 update every 9.4 seconds
Hmm, looks like it impacts windows as well. The cause is the JSON layer fires an update event for any item updates, and in doing so it's hit the main message loop with 300+ update events, which trigger major refreshes....
I think I've a fix for it, however, it's not something the code introduced, it was already there lurking in the shadows...
Posts: 17,855
Joined: Jan 2011
Reputation:
1,055
Milhouse
Retired Team-Kodi Member
Posts: 17,855
Yes, I'm not suggesting your code has a bug. Your code is now revealing this rather nasty problem as a result of being so much more efficient and generating so many more GUI updates than were previously possible!
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Posts: 5,184
Joined: Jan 2009
Reputation:
131
The slowing down of updating the current view when lots of items are updated in a short time interval is the reason why we don't do this during a library scan. But there we actually know that we are probably going to get a lot of updates. With JSON-RPC we have no clue if there will be 1 or 10 or 100 or 1000 updates because every request/action is independent of the other.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.