1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-15 05:55:06 -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 description = null;
private String query = ""; private String query = "";
private boolean integrate = false; private boolean integrate = false;
private String mUuid = UUID.randomUUID().toString(); private String mUuid = null;
private boolean builtin = false; private boolean builtin = false;
private String[] accountUuids = null; private String[] accountUuids = null;
private String[] folderNames = null; private String[] folderNames = null;
@ -93,6 +93,10 @@ public class SearchAccount implements BaseAccount, SearchSpecification, Serializ
} }
public String getUuid() public String getUuid()
{ {
if(mUuid == null )
{
setUuid( UUID.randomUUID().toString());
}
return mUuid; return mUuid;
} }
public void setUuid(String nUuid) public void setUuid(String nUuid)