Review main Merged

27077[TASK] Remove strlen calls in the DatabaseConnection

Tim Lochmüller CR +2 V +2 Easy +7 −7 updated 01/27/14, 20:45

Commit message

Remove the strlen calls in the DatabaseConnection to avoid many
string length calculations for the small checks in the query
build process. Replace it with a string cast and not identical
operator.

Review

  • Code review CR +2
    • Wouter Wolters +2
  • Verified V +2
    • Wouter Wolters +2

Issues 1

Files 1

Review log 11

  1. Markus Klein commented on patch set 1 CR -1 01/27/14, 19:17

    I would prefer to do the replacement different: strlen($var) === 0 should be replaced by (string)$var === ''. The typecast is necessary to capture NULL values properly. Changing this to ($var ?: ) does change the behaviour if $var is 0 or '0' or NULL. One has to judge if this is important here.
  2. Mr. Jenkins commented on patch set 1 01/27/14, 19:18

  3. Tim Lochmüller uploaded patch set 2 01/27/14, 19:25

  4. Markus Klein voted on patch set 2 V +1 CR +1 01/27/14, 19:28

  5. Wouter Wolters commented on patch set 2 CR +1 01/27/14, 19:38

    Looks good, only question is why backport this to older branches. It is not broken in these branches.
  6. Mr. Jenkins commented on patch set 2 CR -1 V -1 01/27/14, 19:40

  7. Tim Lochmüller uploaded patch set 3 01/27/14, 19:50

  8. Wouter Wolters wrote 01/27/14, 20:03

    Topic set to "performance".
  9. Mr. Jenkins commented on patch set 3 01/27/14, 20:04

  10. Wouter Wolters commented on patch set 3 V +2 CR +2 01/27/14, 20:45

    Taking Markus vote as valid, only commit message has changed.
  11. Wouter Wolters merged patch set 4 01/27/14, 20:45