I feel that reading from plist every time must be time consuming. Need to check how much time it takes to get the device name.
The idea to reduce the time are as follows
-
Save the device info in the user default keeping in mind that newer version of the lib can have updated names, enum etc. and update if there is new version.
-
Once we have updates info keep it in internal static variable and always return from it. This will reduce the memory footprint and would be much faster if new instance is created. Also will be faster in subsequent launches as the data will be read from user defaults rather than the plist
I feel that reading from plist every time must be time consuming. Need to check how much time it takes to get the device name.
The idea to reduce the time are as follows
Save the device info in the user default keeping in mind that newer version of the lib can have updated names, enum etc. and update if there is new version.
Once we have updates info keep it in internal static variable and always return from it. This will reduce the memory footprint and would be much faster if new instance is created. Also will be faster in subsequent launches as the data will be read from user defaults rather than the plist