This problem arose from my lexer plugin for Notepad++, but part of the problem lies in Scintilla code from what I can tell. My lexer has an immense number of keywords and is loaded into Scintilla as an external lexer. On some machines, a noticeable lag is observed.
From studying the code, I've noticed that each time ExternalLexerModule::Lex is called, WordListsToStrings is also called, and once inside my plugin's lex function, the WordList must be recreated. I can cache the WordList object, but the WordListsToStrings is still called every time a character is typed as far as I can tell.
I'm certainly open to suggestions on how to improve the situation.
For reference, my plugin is called GmodLua (http://code.google.com/p/npp-gmod-lua/)