Add TEXT and LINE_COUNT flags to SCN_UPDATEUI
Neil <[email protected]> Sun, 12 Jul 2026 21:52:39 -0700 (PDT)
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_142860_227346294.1783918359238 Content-Type: multipart/alternative; boundary="----=_Part_142861_91865134.1783918359238" ------=_Part_142861_91865134.1783918359238 Content-Type: text/plain; charset="UTF-8" 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 -- You received this message because you are subscribed to the Google Groups "scintilla-interest" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/ea4cff2b-beb0-4533-8b83-ac4f8129bdafn%40googlegroups.com. ------=_Part_142861_91865134.1783918359238 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div>When investigating slow performance in applications that use Scintilla= , excessive notifications are often the cause.</div><div><br /></div>Applic= ations often monitor SCN_MODIFIED to see if something has changed in Scinti= lla but, since these notifications may be fired intensely for some operatio= ns like replace all, they may cause a significant performance cost.<div><br= /></div><div>SCN_UPDATEUI fires on idle after modifications have occurred = so can coalesce the effect of many SCN_MODIFIED events and thus perform bet= ter.</div><div><br /></div><div>When implementing features like URL highlig= hting or spell checking, applications want to know when the text has change= d. Currently,=C2=A0SCN_UPDATEUI reports=C2=A0SC_UPDATE_CONTENT for text cha= nges but also for many other changes such as styling. If the feature is cos= tly to perform then it shouldn't be run again for non-text changes. An SC_U= PDATE_TEXT flag for SCN_UPDATEUI may improve this.</div><div><br /></div><d= iv>Applications may have a line number margin that widens or narrows depend= ing on the number of digits needed to display all line numbers. A=C2=A0SC_U= PDATE_LINE_COUNT flag for=C2=A0SCN_UPDATEUI can improve performance for thi= s feature.</div><div><br /></div><div>Both of these flags are trivial to ca= lculate and no more notifications occur as they are just adding on to exist= ing SC_UPDATE_CONTENT messages.</div><div><br /></div><div>With these addit= ions applications may be able to set the modification mask to receive fewer= =C2=A0SCN_MODIFIED=C2=A0notifications or even none.</div><div><br /></div><= div>Are there any other events that are detected with=C2=A0SCN_MODIFIED=C2= =A0that would be easy to summarize as SCN_UPDATEUI flags?</div><div><br /><= /div><div>Neil</div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;scintilla-interest" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= scintilla-interest/ea4cff2b-beb0-4533-8b83-ac4f8129bdafn%40googlegroups.com= ?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/= scintilla-interest/ea4cff2b-beb0-4533-8b83-ac4f8129bdafn%40googlegroups.com= </a>.<br /> ------=_Part_142861_91865134.1783918359238-- ------=_Part_142860_227346294.1783918359238--