Posted 19 years ago
by tobias weltner
I am sorry to fill this forum up these days ;-) so many questions, and so little time to eval your control.
Anyway, I noticed a considerable performance hit using this:
Editor.Document.GetTokenText(token)
On a 3000-line-code with 700 tokens to find, it takes a couple of *seconds* to get the token texts.
Is there a faster way to do this?
Background is that I need to find the token texts of all tokens identified as variable to put them into a listview.
I first suspected the listview to be the bottleneck but it really is the way how syntaxeditor extracts token texts.
Would it for example be possible to store the token text inside the semanticparsedata once the token is created?
I would need to do that inside of the semanticparser I suspect. But how would I be notified if the token text changes later but the token type remains the same?
What I'd think I could do is use the token.modified-property and if it is modified then add its text as semanticparsedata.
[Modified at 06/01/2005 04:39 AM]
Anyway, I noticed a considerable performance hit using this:
Editor.Document.GetTokenText(token)
On a 3000-line-code with 700 tokens to find, it takes a couple of *seconds* to get the token texts.
Is there a faster way to do this?
Background is that I need to find the token texts of all tokens identified as variable to put them into a listview.
I first suspected the listview to be the bottleneck but it really is the way how syntaxeditor extracts token texts.
Would it for example be possible to store the token text inside the semanticparsedata once the token is created?
I would need to do that inside of the semanticparser I suspect. But how would I be notified if the token text changes later but the token type remains the same?
What I'd think I could do is use the token.modified-property and if it is modified then add its text as semanticparsedata.
[Modified at 06/01/2005 04:39 AM]