Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Долгое выполнение showCustomSuggestions с маленьким параметром на большом тексте #335

Open
tormozit opened this issue Jul 22, 2023 · 1 comment

Comments

@tormozit
Copy link
Contributor

tormozit commented Jul 22, 2023

На маленьком тексте или в начале любого текста с тем же значением параметра вызов метода showCustomSuggestions() выполняется очень быстро (2мс). Но в конце текста 30К строк выполняется 350мс+ даже с пустым параметром.
Код 1С:

						РедакторHTML.setOption("showSnippetsOnCustomSuggestions", мСтруктураТипаКонтекста.ИмяОбщегоТипа = "Локальный");
						РедакторHTML.setOption("generateBeforeShowSuggestEvent", Ложь);
						РедакторHTML.showCustomSuggestions(СтрокаСпискаАвтодополненияHTML);
						РедакторHTML.setOption("generateBeforeShowSuggestEvent", Истина);

Значение параметра:

[
{
"name": "Выбор",
"kind": "Property",
"detail": "ВыбранныеПоляКомпоновкиДанных",
"documentation": "_"
},
{
"name": "ДополнительныеСвойства",
"kind": "Property",
"detail": "Структура",
"documentation": "_"
},
{
"name": "ДоступныеОбъекты",
"kind": "Property",
"detail": "ДоступныеОбъектыНастройкиКомпоновкиДанных",
"documentation": "_"
}
]

Редактируемый текст приложен
Clipboard Text.zip

@tormozit
Copy link
Contributor Author

tormozit commented Jul 22, 2023

Похоже это родственник #320 , но у него хотя бы как то можно оправдать вычисления в зависимости от размера текста. А в данной ситуации их вообще не должно быть. Поэтому задержка не должна зависеть от размера текста.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant