Hello, when I open 100x .cpp + .h file, I have very big performance problem. I need wait more than 90min to open it. See the attached file to have the profile. 90% of the time is into KateGlobal::readConfig(KConfig*) Read only one time this config, and general optimization in this case, can be useful for the user experience. I'm under linux, with radeon HD 5450 with open source drivers. Thanks to fix it, to have correct open of multiple file. Reproducible: Always
I'm under kde 4.8.5 http://files.first-world.info/temp/callgrind.out.4420.gz
What happens, if you open these 200 files in Kate instead of KWrite?
No performance problem with kate.
It's because KWrite calls the Editor's readConfig for each MainWindow. This is redundant, as the global config is the same for all main windows. So this should be done only once, as can be seen in the backtrace. Pseudo backtrace: KWrite::readConfig() KWrite::readConfig(KSharedConfigPtr config) KTextEditor::Editor::readConfig(config.data())
Git commit aac62d627e69d6cfc548bbfef1e85545c858c94e by Dominik Haumann. Committed on 24/10/2012 at 12:55. Pushed by dhaumann into branch 'master'. Call Editor::readConfig() with KGlobal::config() as parameter only once M +3 -0 kwrite/kwriteapp.cpp M +6 -1 kwrite/kwritemain.cpp http://commits.kde.org/kate/aac62d627e69d6cfc548bbfef1e85545c858c94e