2012-05-21, 00:01
Thanks for explanation,
@Resume point: maybe it was measurement error, i got a lot of spikes and these 200-300ms was just around my "error threshold"
@Fanart: caching of results will be of couse best but isn't it possible to simply store null URL in ART table for fanart in case I want to say "there will never be fanart"?
@Loading data from DB: in last commit you just moved DB opening/closing to thread Start/Finish events. What about taking it even further and load all data (what GetArtForItem() does but for all items) at the start and thus limit 1600 queries to just 1? What tradeoffs does it have? I know that it may be slower for first item and cost some memory. Maybe it'll work poorly for some filtered lists?
@1600 items, though, 1800ms sounds about right: yes, you are right, it's fine for what it does, but ... I simply don't like how it affects GUI. From my point of view all GUI related operations (IMHO fanart/thumb loading belongs there) should be as responsive as possible. "Brute force" approach doesn't work well for them, there always will be someone with slower machine or even more entries in library. Idea what I was talking about at Friday was to make this background loading driven by GUI. Basically let GUI tell to background loader where to start. I experimented with it little bit
https://github.com/bambi73/xbmc/commit/a...3928bead5a
Please note that it's crude piece of code (I'm mostly Java developer) which should only serve as proof of concept. I tested it only on TV Show library list so maybe it'll broke thing somewhere else
@Caching: I think it's way to go, i was quite surprised that it was loading things again and again
Cheers
Bambi
@Resume point: maybe it was measurement error, i got a lot of spikes and these 200-300ms was just around my "error threshold"
@Fanart: caching of results will be of couse best but isn't it possible to simply store null URL in ART table for fanart in case I want to say "there will never be fanart"?
@Loading data from DB: in last commit you just moved DB opening/closing to thread Start/Finish events. What about taking it even further and load all data (what GetArtForItem() does but for all items) at the start and thus limit 1600 queries to just 1? What tradeoffs does it have? I know that it may be slower for first item and cost some memory. Maybe it'll work poorly for some filtered lists?
@1600 items, though, 1800ms sounds about right: yes, you are right, it's fine for what it does, but ... I simply don't like how it affects GUI. From my point of view all GUI related operations (IMHO fanart/thumb loading belongs there) should be as responsive as possible. "Brute force" approach doesn't work well for them, there always will be someone with slower machine or even more entries in library. Idea what I was talking about at Friday was to make this background loading driven by GUI. Basically let GUI tell to background loader where to start. I experimented with it little bit
https://github.com/bambi73/xbmc/commit/a...3928bead5a
Please note that it's crude piece of code (I'm mostly Java developer) which should only serve as proof of concept. I tested it only on TV Show library list so maybe it'll broke thing somewhere else
@Caching: I think it's way to go, i was quite surprised that it was loading things again and again
Cheers
Bambi