Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • P Pacman
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Filipe Laíns
  • Pacman
  • Repository
Switch branch/tag
  • pacman
  • lib
  • libalpm
  • sync.c
Find file BlameHistoryPermalink
  • Anatol Pomozov's avatar
    Eliminate extra loop over dbs_sync · 886a6677
    Anatol Pomozov authored Jan 29, 2020 and Allan McRae's avatar Allan McRae committed Jan 31, 2020
    
    
    Current flow looks like
      loop dbs_sync {
        loop pkgs {
          if pkg.db == db then process(pkg, db)
        }
      }
    
    Package sync transaction always has a counterpart in the dbs_sync list
    (I cannot come up with a use-case when it is not true). So the loop can
    be simplified to:
    
      loop pkgs {
        process(pkg, pkg.db)
      }
    
    Tested: 'ninja test' & manually by using pacman with this patch for a
    week
    Signed-off-by: Anatol Pomozov's avatarAnatol Pomozov <anatol.pomozov@gmail.com>
    Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>
    886a6677