Performance issue with large number of span indicators

SyntaxEditor for Windows Forms Forum

Posted 19 years ago by shark92651
I have found what I think to be a severe performance degradation when a large number of span indicators is used. For example, if I have a SQL file in the editor that is around 5 meg in size, 48,000 lines, and if I create somewhere in the number of 40,000 span indicators (will explain WHY below), then it can take around 90 seconds just to insert a Return near the top of the file. I assume the reason it takes so long is that the control has to update the offsets off all the indicators below the insertion point. Can anything be done to increase the speed of this update? Creating the 40,000 span indicators does not take nearly as long as updating them.

The reason I have so many span indicators is that I am creating one for each SQL statement in the script. If the script contains thousands of INSERT statements, then there is the problem. I can improve things on my end by only creating span indicators for certain statements, but my request for a performance improvement when updating span indicator offsets would still be welcomed.

Comments (1)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
We'll try and come up with a way to improve performance on the span indicators. However if you are using them for non-UI purposes then I'd highly recommend making your own method of maintaining and storing them, instead of using the span indicators. You'd essentially hook into the DocumentTextChanging and DocumentTextChanged events to maintain your collection.

Actipro Software Support

The latest build of this product (v24.1.0) was released 5 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.