I was looking at #666898: Allow user to specify db name suggestion and saw that there were two for-loops when one would suffice.
Attached patch implements this optimization and the principal of "return early".
This is a relatively minor issue, but was annoying me.

CommentFileSizeAuthor
provision-optimize-suggest-db-name.patch1006 bytesAaronBauman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adrian’s picture

Status: Needs review » Fixed

committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 6bfb7cd on debian, dev-dns, dev-koumbit, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newhooks, dev-simplerinstaller, prod-koumbit, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by adrian:
    optimize the suggest_db_url routine. thanks aaronbauman - #861910