Skip to content
  • Hartley McGuire's avatar
    752a1d78
    [rubygems/rubygems] Implement pub_grub strategy interface · 752a1d78
    Hartley McGuire authored
    My application spends more than 30% of time during `bundle update`
    comparing versions due to versions being sorted inside
    next_package_to_try. This has been addressed in pub_grub by defining a
    strategy interface (a `#next_package_and_version` method) which allows
    consumers to have finer control over the heuristic to select the next
    package to try.
    
    This commit implements the new strategy interface to remove extraneous
    version sorting (previously in next_package_to_try) since only the final
    count of versions is used.
    
    Combined with a previous change to pub_grub (already applied to
    Bundler), this commit results in `bundle update` taking only half the
    time it did on 2.6.5.
    
    https://github.com/rubygems/rubygems/commit/62f69e27f0
    752a1d78
    [rubygems/rubygems] Implement pub_grub strategy interface
    Hartley McGuire authored
    My application spends more than 30% of time during `bundle update`
    comparing versions due to versions being sorted inside
    next_package_to_try. This has been addressed in pub_grub by defining a
    strategy interface (a `#next_package_and_version` method) which allows
    consumers to have finer control over the heuristic to select the next
    package to try.
    
    This commit implements the new strategy interface to remove extraneous
    version sorting (previously in next_package_to_try) since only the final
    count of versions is used.
    
    Combined with a previous change to pub_grub (already applied to
    Bundler), this commit results in `bundle update` taking only half the
    time it did on 2.6.5.
    
    https://github.com/rubygems/rubygems/commit/62f69e27f0
Loading