| Summary: | very slow filtering of bibliography | ||
|---|---|---|---|
| Product: | [Applications] KBibTeX | Reporter: | Gandalf Lechner <gandalflechner> |
| Component: | General | Assignee: | Thomas Fischer <fischer> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | git (master) | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/kbibtex/388b867499d03403c7b60ffed8b6b9ee12993eca | Version Fixed/Implemented In: | 0.9 |
| Sentry Crash Report: | |||
|
Description
Gandalf Lechner
2019-01-30 00:41:59 UTC
I can confirm this performance regression. I am almost certain which code section is responsible and will look into fixing it. Please check if the problem has been fixed in commit defbd6867137ca available here: https://commits.kde.org/clones/kbibtex/thomasfischer/kbibtex/defbd6867137ca16699116015945e81fcad99b2c To test the code, have a look at the "Quick Start" instructions: https://userbase.kde.org/KBibTeX/Development#Quick_Start_to_Run_KBibTeX_from_Git Run script run-kbibtex.sh as follows: bash run-kbibtex.sh "https://anongit.kde.org/clones/kbibtex/thomasfischer/kbibtex.git" "bugs/kde403751" Please test and confirm if that commit fixes your performance issues. that commit has fixed it for me, thanks! Git commit 388b867499d03403c7b60ffed8b6b9ee12993eca by Thomas Fischer. Committed on 27/02/2019 at 19:49. Pushed by thomasfischer into branch 'kbibtex/0.9'. Avoid accessing configuration file all the time In commit 36040dc280ccb3ad, a first step towards a centralized configuration system was undertaken. A single static function in a central class became available to probe whether the current bibliography system was BibTeX or BibLaTeX. To allow for synchronization between multiple instances of KBibTeX programs and KParts, configuration values were read from configuration files every time this setting got queried. This approach introduced a noticeable performance penalty as reported in bug report 403751, requiring a rewrite of this code section. To avoid reading/writing from/to configuration files at every function call got avoided by making use of KConfigWatcher, a DBUS-based solution to notify other processes' instances of a KSharedConfig object about changes made to the configuration. Only if such notifications get received a re-read from configuration files is necessary, otherwise a cached setting value is used. Those changes also required to refactor previously static functions of class Preferences to become regular functions called on a singleton instance of Preferences. FIXED-IN: 0.9 M +1 -1 CMakeLists.txt M +2 -2 src/config/bibtexentries.cpp M +2 -2 src/config/bibtexfields.cpp M +85 -18 src/global/preferences.cpp M +22 -6 src/global/preferences.h M +2 -2 src/gui/config/entrylayout.cpp M +2 -2 src/gui/element/elementwidgets.cpp M +2 -2 src/gui/element/findpdfui.cpp M +3 -3 src/gui/preferences/settingsgeneralwidget.cpp M +2 -2 src/io/fileimporterris.cpp M +2 -2 src/networking/associatedfiles.cpp https://commits.kde.org/kbibtex/388b867499d03403c7b60ffed8b6b9ee12993eca Git commit 67420b74329be7e5a97da0644a76a35ddacef9f8 by Thomas Fischer. Committed on 27/02/2019 at 19:47. Pushed by thomasfischer into branch 'master'. Avoid accessing configuration file all the time In commit 36040dc280ccb3ad, a first step towards a centralized configuration system was undertaken. A single static function in a central class became available to probe whether the current bibliography system was BibTeX or BibLaTeX. To allow for synchronization between multiple instances of KBibTeX programs and KParts, configuration values were read from configuration files every time this setting got queried. This approach introduced a noticeable performance penalty as reported in bug report 403751, requiring a rewrite of this code section. To avoid reading/writing from/to configuration files at every function call got avoided by making use of KConfigWatcher, a DBUS-based solution to notify other processes' instances of a KSharedConfig object about changes made to the configuration. Only if such notifications get received a re-read from configuration files is necessary, otherwise a cached setting value is used. Those changes also required to refactor previously static functions of class Preferences to become regular functions called on a singleton instance of Preferences. M +1 -1 CMakeLists.txt M +2 -2 src/config/bibtexentries.cpp M +2 -2 src/config/bibtexfields.cpp M +85 -18 src/global/preferences.cpp M +22 -6 src/global/preferences.h M +2 -2 src/gui/config/entrylayout.cpp M +2 -2 src/gui/element/elementwidgets.cpp M +2 -2 src/gui/element/findpdfui.cpp M +3 -3 src/gui/preferences/settingsgeneralwidget.cpp M +2 -2 src/io/fileimporterris.cpp M +2 -2 src/networking/associatedfiles.cpp https://commits.kde.org/kbibtex/67420b74329be7e5a97da0644a76a35ddacef9f8 |