diff --git a/CHANGELOG.md b/CHANGELOG.md index 21fd2a531b9..6119fdd1cb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - We now set the WM_CLASS of the UI to org-jabref-JabRefMain to allow certain Un*x window managers to properly identify its windows - We changed the default paths for the OpenOffice/LibreOffice binaries to the default path for LibreOffice - We no longer create a new entry editor when selecting a new entry to increase performance. [#3187](https://github.com/JabRef/jabref/pull/3187) +- We increased performance and decreased the memory footprint of the entry editor drastically. [#3331](https://github.com/JabRef/jabref/pull/3331) + ### Fixed - We fixed the translation of \textendash in the entry preview [#3307](https://github.com/JabRef/jabref/issues/3307) diff --git a/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java b/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java index 394e539a41a..1b9b5581a3c 100644 --- a/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java +++ b/src/main/java/org/jabref/gui/entryeditor/FieldsEditorTab.java @@ -39,19 +39,21 @@ */ class FieldsEditorTab extends EntryEditorTab { - private final Region panel; private final List fields; private final EntryEditor parent; private final Map editors = new LinkedHashMap<>(); private final JabRefFrame frame; private final BasePanel basePanel; private final BibEntry entry; + private final boolean isCompressed; + private Region panel; private FieldEditorFX activeField; + public FieldsEditorTab(JabRefFrame frame, BasePanel basePanel, List fields, EntryEditor parent, boolean addKeyField, boolean compressed, BibEntry entry) { this.entry = Objects.requireNonNull(entry); this.fields = new ArrayList<>(Objects.requireNonNull(fields)); - + this.isCompressed = compressed; // Add the edit field for Bibtex-key. if (addKeyField) { this.fields.add(BibEntry.KEY_FIELD); @@ -61,8 +63,6 @@ public FieldsEditorTab(JabRefFrame frame, BasePanel basePanel, List fiel this.frame = frame; this.basePanel = basePanel; - panel = setupPanel(frame, basePanel, compressed); - // The following line makes sure focus cycles inside tab instead of being lost to other parts of the frame: //panel.setFocusCycleRoot(true); } @@ -305,6 +305,7 @@ public void requestFocus() { @Override protected void initialize() { + panel = setupPanel(frame, basePanel, isCompressed); setContent(panel); } }