Skip to content
Snippets Groups Projects
Closed Browser extension feels slower recently
  • View options
  • Browser extension feels slower recently

  • View options
  • Closed Issue created by Warren Gifford

    Created by: felixfbecker

    The browser extension feels like it is slowing down GitHub recently.

    Could this be because of Quinn's recent refactor to Model?

    For example, take a look at this profile from switching two PR tabs:

    image

    A lot of time is spend in removeModel() removing all the text documents from the code views. Models are stored in an array and every removeModel() removes one model with array.filter(), meaning we are iterating roughly n^2 times: https://sourcegraph.com/github.com/sourcegraph/sourcegraph@browser-api/-/blob/shared/src/api/client/services/modelService.ts#L83:28 I think it should use a Map by URI instead.

    We also should probably use asyncScheduler instead of animationFrameScheduler to give the event loop time to process other macrotasks inbetween.

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first