xbmc/xbmc — pull request #5184 by jmarshallnz (2014-08-09 02:37:05+00:00)
Title: RFC: Actor link switch

This switches the actorlink tables to a single actorlinks table similar to taglinks.

Performance is similar on SQLite (on an SSD): With 1000 repeats per cast, I get:

old: 515.629211 +/- 50.798962 ms
new: 525.454163 +/- 48.952896 ms
diff: 9.825000 +/- 14.802364 ms

Those are 95% confidence intervals, so on SQLite at least, no significant difference.

@MilhouseVH mind testing on mysql? An easy way is to make sure you have the skin widgets script installed and just monitor the log. The CI will drop lower as more movies/shows/episodes are fetched ofc.

It has a repeat of 1000 (x2) queries each time GetCast() is called, so another way is to just call the JSON GetMovies/Episodes/Shows requesting the cast on a bunch of movies/shows/episodes and waiting till it does it's thing.

Assuming the timing on MySQL is OK (can't see why it wouldn't be) I'll tidy up, drop the stats and move the rest of the link tables to the same format.

@Montellese: ATM I've used `media_type` and `media_id` which is different to taglinks (idMedia) but I have no preference as long as we're consistent. I guess we use idMedia elsewhere, and it fits in with idFoo in general.