Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Merge requests
  • !526

Improve performance of get_dirty_buck_version

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/rhencke/dirty into master Nov 22, 2015
  • Overview 9
  • Commits 2
  • Pipelines 0
  • Changes 1

Created by: rhencke

When running Buck from a dirty working copy, a large amount of startup time was spent calculating the version in get_dirty_buck_version. git read-tree was reading a fresh index into a temporary file, which contained no stat() information about the working copy's current stat. When git add -u then ran, it then had to rebuild this information for all tracked files, which was time-consuming.

The new version re-uses the current index's stat() information when writing the index to a temporary file. It also shaves off one call to git, taking advantage of the fact that HEAD counts as a tree-ish object that can be passed to git read-tree.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/rhencke/dirty