-
Notifications
You must be signed in to change notification settings - Fork 235
First time initialization with an empty string as password is very slow, it typically takes 4 seconds on every device #64
Comments
@Rkdroid See Issue #18 and mentioned PullRequest #48. With this you can significantly reduce initialization time (in my case it was about 50% faster). |
Let me see what I can do tonight about pushing new release with this change
…On Thu, 22 Jun 2017, 13:26 miklendap, ***@***.***> wrote:
@Rkdroid <https://github.com/rkdroid> See Issue #18
<#18> and mentioned
PullRequest #48 <#48>.
With this you can significantly reduce initialization time (in my case it
was about 50% faster).
But unfortunately even if PullRequest #48
<#48> was merged at 31
Aug 2016, current version of SecurePreferences (0.1.4) does not contain
this changes. So you can fork, or add updated SecurePreferences class
directly into your project.
Or maybe could @scottyab <https://github.com/scottyab> release new
version containing PullRequest #48
<#48>, couln't he? 😄
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYqiSK-c_0WmqZq5MGiTKQY7vJ0A6p9ks5sGl1xgaJpZM4Nh-HW>
.
|
Hey @miklendap @Rkdroid I'm in the middle of sorting a 0.1.5 release to include the most recent changes. In terms of the slowness that's something I'll be addressing in next version to make it down to the developer to choose fast/less secure or slow/more secure. Thanks for the feedback. |
You can keep your SecurePreferences instance as a singleton and create it on your Application class along with Fabric and others stuffs, my app has a splash screen (with a drawable in theme's background) so the user won't notice the delay. |
private SecurePreferences mSecurePrefs;
private SecurePreferences openSharedPrefs(){
if (mSecurePrefs == null) {
mSecurePrefs = new SecurePreferences(context, "", "sec_prefs.xml");
}
return mSecurePrefs;
}
Usage:
PreferenceManager pref = new SharedPreferencesManager(context);
String text = pref.getText();
The first time initialisation of preferences takes lot of time, on average 4 seconds, which is really frustrating for the user. have implemented this library at the first time launch of the app and lot of users are complaining that app never loads because of this issue.
Can you please help to improve the speed of initialization with respect to the above scenario.
Thanks
The text was updated successfully, but these errors were encountered: