Does using SharedPreferences drain resources?
Accessing SharedPreferences takes some definite amount of time because they are written and read from an actual file. So if you call this code too often from your mainThread, you will end up with ApplicationNotResponding errors and a bad user experience. The point is to call this on a background Thread (java) or coroutine(kotlin). The same goes for accessing the network, reading and writing to the database, long calculations etc 

https://developer.android.com/training/articles/perf-anr