PhotoGallery runs supper slow on physical device Samsung tablet

Takes 8 mins to return data.
Runs fast in emulator .02 sec
Speed test shows fast 55 Mbps download on tablet.
Turned off settings\developer options didn’t help

The background thread seems to pause.

Turned off settings\developer options, powered off Android device and problem was gone even with developer options turned back on.