HTTPS clone URL
Subversion checkout URL
Please sign in to comment.
jsonrpc: optimize handling of properties requested by the client
Up until now FillDetails, which contains a loop to go through all the properties requested by the client in a request has been called at least twice (once for the CFileItem and once for the CFooInfoTag) for every media item matching the client's request. With n items and m properties this resulted in n * 2 * m loops which can result in longer response times. By removing the already matched properties from the list of requested properties we get down to n * m loops. Especially for "expensive" properties like "thumbnail" and "fanart" which require additional SQL queries avoiding doing the same work twice which can have a huge impact. In addition moving the logic to retrieve any requested properties directly from the serialization of the media item instead of first checking and handling any special cases results in additional speed-up by not having to do the extra string comparisons and map- lookups required for the special cases.
- Loading branch information...
Showing with 141 additions and 107 deletions.