Consider using custom highlights to implement view-source syntax highlighting.
Categories
(Toolkit :: View Source, enhancement, P3)
Tracking
()
People
(Reporter: emilio, Unassigned)
References
(Blocks 2 open bugs)
Details
So, this is probably by no means a high priority, but it would make laying out long view-source pages a lot cheaper.
In particular, we have cases where view-source hits some pathological performance issues just due to the crazy amount of markup it ends up generating. Bug 1926808 is the most recent example of this but bug 1867249 and bug 1914833 also come to mind.
It seems to me we could mitigate this a lot by using the CSS custom highlights on each line. That way we don't generate more markup (each line is effectively a single preformatted element).
https://www.bram.us/2024/02/18/custom-highlight-api-for-syntax-highlighting/ contains an overview of the approach... This would involve rewriting nsHtml5Highlighter.cpp most likely.
Seems like a fun project if someone has the time...
Updated•1 year ago
|
Description
•