From: Roland Haeder Date: Mon, 27 Jul 2015 11:40:10 +0000 (+0200) Subject: Some performance tuning... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=16f90962642a80146c0174ba75a7032f3fc40ebb;p=jfinancials-swing.git Some performance tuning... Signed-off-by:Roland Häder --- diff --git a/Addressbook/src/org/mxchange/addressbook/database/backend/csv/CsvDatabaseBackend.java b/Addressbook/src/org/mxchange/addressbook/database/backend/csv/CsvDatabaseBackend.java index b109ad4..b09fe8f 100644 --- a/Addressbook/src/org/mxchange/addressbook/database/backend/csv/CsvDatabaseBackend.java +++ b/Addressbook/src/org/mxchange/addressbook/database/backend/csv/CsvDatabaseBackend.java @@ -266,10 +266,12 @@ public class CsvDatabaseBackend extends BaseDatabaseBackend implements CsvBacken StringTokenizer tokenizer; String line; - // Init number/string data values + // Init A lot variables Long num = null; Boolean bool = null; Gender gender = null; + int count = 0; + Contact contact = null; // Read all lines while (!this.isEndOfFile()) { @@ -283,11 +285,9 @@ public class CsvDatabaseBackend extends BaseDatabaseBackend implements CsvBacken // @TODO Move this into separate method tokenizer = new StringTokenizer(line, ";"); - // Count round - int count = 0; - - // Init contact object - Contact contact = null; + // Reset variables + count = 0; + contact = null; // The tokens are now available, so get all while (tokenizer.hasMoreElements()) {