From 37cf70da1e4898dcca4cc752eaec20f00b27c16b Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 21 Apr 2020 18:16:02 +0200 Subject: [PATCH 1/3] Improve performance for loading files - Performance improvements around groups - Remove detection of duplicate ID when inserting entries (it's not really possible to create two entries with the same except if you use `setId` manually) - Remove detection of duplicate bibtex keys when opening a file (the result was not used and we have a integrity check for it) - Use EnumMap instead of HashMap to cache fields as keywords (which is only used for Keyword and Groups fields anyway) - Fix bug where latex code was displayed in the maintable - Lazy init of source tab --- .idea/runConfigurations/JabRef_Main.xml | 1 + src/main/java/org/jabref/gui/BasePanel.java | 5 - .../org/jabref/gui/entryeditor/SourceTab.java | 24 +++-- .../gui/fieldeditors/FieldNameLabel.java | 4 +- .../gui/maintable/BibEntryTableViewModel.java | 10 +- .../gui/maintable/MainTableDataModel.java | 3 +- .../preferences/TableColumnsTabViewModel.java | 6 +- .../jabref/logic/importer/ParserResult.java | 32 +----- .../importer/fileformat/BibtexParser.java | 16 +-- .../jabref/model/database/BibDatabase.java | 33 +++---- .../jabref/model/database/BibDatabases.java | 20 ---- .../java/org/jabref/model/entry/BibEntry.java | 52 +++++----- .../model/entry/field/FieldFactory.java | 2 +- .../model/entry/field/InternalField.java | 1 - .../model/entry/field/StandardField.java | 5 +- .../model/groups/AutomaticKeywordGroup.java | 20 ++-- .../jabref/model/groups/ExplicitGroup.java | 8 +- .../jabref/model/groups/WordKeywordGroup.java | 97 +++++++++++++------ .../model/search/matchers/OrMatcher.java | 4 +- .../java/org/jabref/model/util/ListUtil.java | 23 +++++ .../org/jabref/model/util/MultiKeyMap.java | 9 +- .../importer/fileformat/BibtexParserTest.java | 12 --- .../BibDatabaseModeDetectionTest.java | 26 ++--- .../model/database/BibDatabaseTest.java | 4 +- 24 files changed, 199 insertions(+), 218 deletions(-) create mode 100644 src/main/java/org/jabref/model/util/ListUtil.java diff --git a/.idea/runConfigurations/JabRef_Main.xml b/.idea/runConfigurations/JabRef_Main.xml index 4a1ef684c65..d57c0fd5ac5 100644 --- a/.idea/runConfigurations/JabRef_Main.xml +++ b/.idea/runConfigurations/JabRef_Main.xml @@ -2,6 +2,7 @@