List of problems in pkgdb, which make it slow:

  • In auto mode, the fix_cycles() still checks for cycles. However, it only outputs the results and does not fix them. Since the auto mode is usually called by portupgrade, this wastes time.
   Solution: skip this stage in auto mode.
   Effect: reduced time from 1:44 to 0:30
  • Even there is no changes, we still regenerate +REQUIRED_BY
   Solution: if not changed, do not regenerate
   Effect: reduced time from 0:30 to 0:23