Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Gwenview Gwenview
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GraphicsGraphics
  • GwenviewGwenview
  • Merge requests
  • !133

Reduce the number of times we query all mount points

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Nicolas Fella requested to merge work/mountpoint into master Jan 27, 2022
  • Overview 2
  • Commits 1
  • Pipelines 2
  • Changes 1

urlIsFastLocalFile is called a lot and every time we query all the mountpoints to determine whether the file is on a slow one.

We can optimize this based on two assumptions:

  • A folder is on only on one mountpoint
  • The next call to urlIsFastLocalFile is likely for a file in the same folder

Keep track of the last folder and its mountpoint and only query the mountpoints when the folder changes

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/mountpoint