1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 09:08:49 -05:00

Turns out that UUID generation is expensive. deferring it until first access improves startup performance.

This commit is contained in:
Jesse Vincent 2010-12-24 22:48:19 +00:00
parent d64d9c460a
commit fa510f2dab

View File

@ -18,7 +18,7 @@ public class SearchAccount implements BaseAccount, SearchSpecification, Serializ
private String description = null;
private String query = "";
private boolean integrate = false;
private String mUuid = UUID.randomUUID().toString();
private String mUuid = null;
private boolean builtin = false;
private String[] accountUuids = null;
private String[] folderNames = null;
@ -93,6 +93,10 @@ public class SearchAccount implements BaseAccount, SearchSpecification, Serializ
}
public String getUuid()
{
if(mUuid == null )
{
setUuid( UUID.randomUUID().toString());
}
return mUuid;
}
public void setUuid(String nUuid)