Check for places to use fast URI serialisation (like HistoryService) #18215
Closed
Description
When profiling the "[renderer] restore editor view state"
you will notice that ~10ms are spend in the history service comparing the current input with old input. The time is spend in handleEditorEventInHistory
which is busy retrieving data from storage, building URIs and comparing them against other URIs. The code uses URI.parse
and URI.toString
which have many safe guards and checks and are consequently not super-fast. However, when you can trust URI, like in this case as they are generated/stored/retrieved from use you should use URI.toJSON
and URI.revive
or better and easier marshalling#stringify/parse
which are drop in replacements (and used by workers/ext-host communication)