Performance: Lazily syntax highlight blob views#39563
Conversation
valerybugakov
left a comment
There was a problem hiding this comment.
It looks fantastic on huge files (tested it locally) 🎉
And cudos for the full-stack solution!
Experimental improvements are great candidates for integration with the upcoming OpenTelemetry client observability. We can enable this feature on the dogfood instance, monitor time saved and potential unexpected side-effects, and decide if we want to make it a default behavior using data.
|
Possible that I'm misunderstanding this but atm this will fetch a lot of the information twice, correct? Should we enable this by default we can optimize to only fetch syntax highlighting information the second time. |
|
@fkling Yep that's right, if we enable it fully I will optimize it - it's just so we can easily enable/disable this as an experimental feature |
Description
This PR adds an experimental feature that:
Example 1: Compared against the current blob view and syntax highlighting
Noticeable on most files, much less time waiting to view code.
LazyExample1.mp4
Example 2: Compared against CodeMirror and the newer syntax highlighting
Mainly noticeable on medium/large files, still valuable I think. New syntax highlighting is pretty awesome :)
LazyExample1-1.mp4
Test plan
Tested locally with the flag enabled and disabled