update_index_data uses std::set for canonicalPaths and pathComponents, and both of these sets are iterated over quite a bit. The cost of iterating over a std::set's rbtree is not cheap, and can be improved by using absl::btree_set instead.
boost::flat_set was also evaluated, but had worse performance numbers overall compared to btree_set.