Skip to content

Check for places to use fast URI serialisation (like HistoryService) #18215

Closed
@jrieken

Description

screen shot 2017-01-06 at 10 32 30

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)

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions