• Alejandro Rodríguez's avatar
    Optimize Banzai::Filter::RelativeLinkFilter · ca696175
    Alejandro Rodríguez authored
        A lot of git operations were being repeated, for example, to build a url
        you would ask if the path was a Tree, which would call a recursive routine
        in Gitlab::Git::Tree#where, then ask if the path was a Blob, which would
        call a recursive routine at Gitlab::Git::Blob#find, making reference to
        the same git objects several times. Now we call Rugged::Tree#path, which
        allows us to determine the type of the path in one pass.
    
        Some other minor improvement added, like saving commonly used references
        instead of calculating them each time.
    ca696175
commit_spec.rb 7.15 KB