Building Inline Comments for Pull Requests and Commits
Oct 31, 2012pkaeding

Summary
This post details the implementation of inline comments for pull requests and commits in Bitbucket. It describes the challenges of 'comment drift' and 'eclipsed' comments, and outlines the complex algorithms developed to handle these scenarios, including 'meta-diffs' for calculating drift on added, removed, and context lines. Performance improvements are also discussed, such as reducing SQL queries with select_related, simplifying activity tab event generation, implementing template fragment caching, and separating diff rendering.