Company
Date Published
Author
Carlos Martín Nieto, Thomas Gummerer
Word count
1098
Language
English
Hacker News points
None

Summary

GitHub significantly improved the performance of their pre-receive hooks, which run during every Git push operation, by rewriting them from Ruby to Go. Originally implemented in 2013 within a Ruby on Rails application, the hooks had accumulated numerous dependencies over time, causing slow startup times that affected user experience. Despite attempts to optimize within the existing framework, a more substantial improvement was achieved by extracting and rewriting the hooks in Go, reducing the median execution time from 880 milliseconds to just 10 milliseconds. This rewrite not only enhances user experience by speeding up push operations but also represents an architectural shift towards a more efficient service design. The change has been successfully implemented on GitHub's main platform and in GitHub Enterprise Server 3.4, reflecting both a technical and user-focused priority.