[Notes] [Git][BuildStream/buildstream][bschubert/optimize-sort] fixup! fixup! fixup! Refactor sorting



Title: GitLab

Benjamin Schubert pushed to branch bschubert/optimize-sort at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/_loader/loader.py
    ... ... @@ -152,7 +152,7 @@ class Loader():
    152 152
                 profile_start(Topics.SORT_DEPENDENCIES, target)
    
    153 153
                 junction, name, loader = self._parse_name(target, rewritable, ticker,
    
    154 154
                                                           fetch_subprojects=fetch_subprojects)
    
    155
    -            loader._sort_dependencies(name)
    
    155
    +            #loader._sort_dependencies(name)
    
    156 156
                 profile_end(Topics.SORT_DEPENDENCIES, target)
    
    157 157
                 # Finally, wrap what we have into LoadElements and return the target
    
    158 158
                 #
    
    ... ... @@ -273,15 +273,6 @@ class Loader():
    273 273
             self._elements[filename] = element
    
    274 274
     
    
    275 275
             def sort_deps(dep_a, dep_b):
    
    276
    -            if dep_a.index is not None:
    
    277
    -                if dep_b.index is not None:
    
    278
    -                    return dep_a - dep_b
    
    279
    -                else:
    
    280
    -                    return -1
    
    281
    -
    
    282
    -            if dep_b.index is not None:
    
    283
    -                return 1
    
    284
    -
    
    285 276
                 if dep_a.dep_type != dep_b.dep_type:
    
    286 277
                     if dep_a.dep_type == Symbol.RUNTIME:
    
    287 278
                         return 1
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]