scintillua icon indicating copy to clipboard operation
scintillua copied to clipboard

Add xml lexer performance improvement used in vis

Open moesasji opened this issue 4 years ago • 1 comments

This adds performance improvements for the xml lexer added to vis in commits: 7e9e0a2ca868aaa214fb38a79fe71da34d6e00da and baa51e934ce057af5b5be829d6a73a3e8b4c03d0

moesasji avatar Dec 20 '20 22:12 moesasji

This change does not correctly handle the following input:

<size
  width=100
  height=100>

The "width=100" line will not be highlighted correctly, but the line below it will. This is why I had to use a function for look-behind.

Note that currently there is no performance penalty because that look-behind function is not called. ('=' is not highlighted at all, and "=[number]" sequences are still highlighted, but not necessarily in the context of attributes.)

orbitalquark avatar Dec 24 '20 15:12 orbitalquark

This change does not correctly handle the following input:

<size
width=100
height=100>

Just that this is not correct XML, attributes must be quoted. For my test text (18 MB text of Bible) it seems to work just fine:

xml-element

mcepl avatar Sep 30 '24 22:09 mcepl

All three related PRs are rebased on the current master in the devel branch, i.e. in https://git.sr.ht/~mcepl/vis/commit/92e7198cfc81

mcepl avatar Sep 30 '24 22:09 mcepl

Closing per comments in #118.

orbitalquark avatar Oct 16 '24 17:10 orbitalquark