Datadog
Datadog logoDatadog · Feature trail

Homebrew Performance Optimization

1 post · Apr 2018

What this trail covers

Datadog's APM has been used to identify and resolve performance bottlenecks in the Homebrew package manager. The investigation focused on the `brew linkage` command, which was found to be slow due to the `LinkageChecker::check_dylibs` function. Two optimization solutions were explored: multi-threading (inviable due to the GIL) and caching. An initial caching mechanism using SQLite3 was implemented, significantly reducing execution time from 11.5 seconds to 182 milliseconds for 106 packages. A subsequent implementation using Ruby's `pstore` was also explored as an alternative without third-party gem dependencies.

All Datadog trails