The database and check is on your device, and triggered when you try to upload. There is not much point to moving scanning to the device-side, unless this technology is intended to be extended so that in the future it doesn't check for an iCloud upload trigger.