From 54dc320ecad9f918fa94270e31d4723c4c28ddaf Mon Sep 17 00:00:00 2001 From: Ilia Permiashkin Date: Mon, 4 Aug 2025 10:42:24 +0000 Subject: [PATCH] IJPL-199855 Performance Degradation in DataSetPerformanceTest Merge-request: IJ-MR-171183 Merged-by: Ilia Permiashkin GitOrigin-RevId: 7fcdd29105138f4bbbf7ec33f066fa801fe01189 --- .../src/com/intellij/spellchecker/SpellCheckerManager.kt | 2 -- .../intellij/spellchecker/grazie/GrazieSpellCheckerEngine.kt | 2 +- .../spellchecker/grazie/dictionary/EditableWordListAdapter.kt | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/spellchecker/src/com/intellij/spellchecker/SpellCheckerManager.kt b/spellchecker/src/com/intellij/spellchecker/SpellCheckerManager.kt index e9273351f065..9b1b83415019 100644 --- a/spellchecker/src/com/intellij/spellchecker/SpellCheckerManager.kt +++ b/spellchecker/src/com/intellij/spellchecker/SpellCheckerManager.kt @@ -223,8 +223,6 @@ class SpellCheckerManager @Internal constructor(@Internal val project: Project, fun removeDictionary(path: String): Unit = spellChecker!!.removeDictionary(path) - fun isDictionaryLoad(path: String): Boolean = spellChecker!!.isDictionaryLoad(path) - fun hasProblem(word: String): Boolean { return !spellChecker!!.isCorrect(word) && !isCorrectExtensionWord(word) } diff --git a/spellchecker/src/com/intellij/spellchecker/grazie/GrazieSpellCheckerEngine.kt b/spellchecker/src/com/intellij/spellchecker/grazie/GrazieSpellCheckerEngine.kt index 117d84871678..9b103d70c0a0 100644 --- a/spellchecker/src/com/intellij/spellchecker/grazie/GrazieSpellCheckerEngine.kt +++ b/spellchecker/src/com/intellij/spellchecker/grazie/GrazieSpellCheckerEngine.kt @@ -138,7 +138,7 @@ class GrazieSpellCheckerEngine( override fun isDictionaryLoad(name: String): Boolean = adapter.containsSource(name) - override fun getDictionaryNames(): Set = adapter.names + override fun getDictionaryNames(): Set = adapter.dictionaryNames override fun loadDictionary(loader: Loader) { this.loader.loadWordList(loader, adapter::addList) diff --git a/spellchecker/src/com/intellij/spellchecker/grazie/dictionary/EditableWordListAdapter.kt b/spellchecker/src/com/intellij/spellchecker/grazie/dictionary/EditableWordListAdapter.kt index 0c1f7c126a67..fe5ee2924a87 100644 --- a/spellchecker/src/com/intellij/spellchecker/grazie/dictionary/EditableWordListAdapter.kt +++ b/spellchecker/src/com/intellij/spellchecker/grazie/dictionary/EditableWordListAdapter.kt @@ -12,6 +12,9 @@ internal abstract class EditableWordListAdapter { val names: Set get() = aggregator.keys + dictionaries.keys + val dictionaryNames: Set + get() = dictionaries.keys + fun addDictionary(dictionary: Dictionary) { dictionaries[dictionary.name] = dictionary }