I posted source code for an Intellisense implementation. This post is for followup discussion, starting with this quote from Stanley.
Stanley - I'll watch for the post you mentioned, and take a look. With only a few thousand entries to search, I don't think the simple binary search routine speeds are a factor - because human typing speed is so slow by comparison.
But I haven't tested the speeds of the Intellisense procedures to know how much time it actually takes, or which procedures take the most time. I'll do that as I get the time and see if the results warrant considering an alternative. Visually, the code I posted seems to keep up with my fingers.
The syntax highlighting routine is a definite speed barrier - especially noticeable when cutting/pasting blocks of text or moving to a new snippet. Have you looked at that code and is your method applicable in any way (other than just the search for keywords in a lookup table)? A large 100X+ improvement in syntax highlighting speed would well be worth the coding effort. I seem to recall more recent posts on syntax highlighting but I haven't tested them for speed. I'm pretty much using the original Borje code.
And to your point about the complexities of a RichEdit control - yes, it can be a pain to work with. Getting clean, crisp and expected responses to user inputs is an ongoing concern of mine. There's a lot of interaction between code, some not-quite-documented 'features', and less than detailled documentation. But, it's the one control that provides formatting capabilities.
I'm still looking at switching to a different edit control - a more recent version of EDM32 and Scintilla are on the list - but just haven't found the time to look into it.
I think you’d find a “Trie” interesting for your project.
But I haven't tested the speeds of the Intellisense procedures to know how much time it actually takes, or which procedures take the most time. I'll do that as I get the time and see if the results warrant considering an alternative. Visually, the code I posted seems to keep up with my fingers.
The syntax highlighting routine is a definite speed barrier - especially noticeable when cutting/pasting blocks of text or moving to a new snippet. Have you looked at that code and is your method applicable in any way (other than just the search for keywords in a lookup table)? A large 100X+ improvement in syntax highlighting speed would well be worth the coding effort. I seem to recall more recent posts on syntax highlighting but I haven't tested them for speed. I'm pretty much using the original Borje code.
And to your point about the complexities of a RichEdit control - yes, it can be a pain to work with. Getting clean, crisp and expected responses to user inputs is an ongoing concern of mine. There's a lot of interaction between code, some not-quite-documented 'features', and less than detailled documentation. But, it's the one control that provides formatting capabilities.
I'm still looking at switching to a different edit control - a more recent version of EDM32 and Scintilla are on the list - but just haven't found the time to look into it.
Comment