๐ `HighlightRange` memory efficiency
Closed this issue ยท 1 comments
thecoolwinter commented
HighlightRange
takes up 48 bytes in memory. It should be replaced by something that is more memory efficient as we make a lot of those objects while highlighting.
thecoolwinter commented
This may have been a red herring from Instruments. When inspecting using MemoryLayout.size(ofValue: HighlightRange(...))
it returns 17
bytes consistently, which is a lot less than the 48 Instruments shows. This could be improved further but these only get allocated a lot on very large documents.