pculture/mirocommunity — comment on commit 86153f06c78abb9681c8b8fb9c3f96a5fac0a245
File:  line 0
By melinath:

I do think there's room for improvement over the way this is handled above. If guid, file_url, and website_url are all provided by the feed (or not provided because the suite doesn't support them) then there is no reason to load the videos before checking for duplicates. However, if say file_url is provided by the suite but not the feed, then it is necessary to load each video before checking for duplicates.

In terms of other flaws in the above method, it's too naive when it comes to removing duplicates, leaving lots of room for race condition issues. OTOH, the current method could be improved on by consolidating its duplicate checking to just one or two queries per video instead of the current 3+.