When investigating slow performance in applications that use Scintilla, excessive notifications are often the cause.
Applications often monitor SCN_MODIFIED to see if something has changed in Scintilla but, since these notifications may be fired intensely for some operations like replace all, they may cause a significant performance cost.
SCN_UPDATEUI fires on idle after modifications have occurred so can coalesce the effect of many SCN_MODIFIED events and thus perform better.
When implementing features like URL highlighting or spell checking, applications want to know when the text has changed. Currently, SCN_UPDATEUI reports SC_UPDATE_CONTENT for text changes but also for many other changes such as styling. If the feature is costly to perform then it shouldn't be run again for non-text changes. An SC_UPDATE_TEXT flag for SCN_UPDATEUI may improve this.
Applications may have a line number margin that widens or narrows depending on the number of digits needed to display all line numbers. A SC_UPDATE_LINE_COUNT flag for SCN_UPDATEUI can improve performance for this feature.
Both of these flags are trivial to calculate and no more notifications occur as they are just adding on to existing SC_UPDATE_CONTENT messages.
With these additions applications may be able to set the modification mask to receive fewer SCN_MODIFIED notifications or even none.
Are there any other events that are detected with SCN_MODIFIED that would be easy to summarize as SCN_UPDATEUI flags?
Neil