Review main Merged

23267[TASK] Use array access instead of traversing hook array

Bernhard Kraft CR +2 V +2 Easy +3 −2 updated 11/28/13, 23:53

Commit message

Instead of making a slow array traversal simply check if there is
a hook object for the cObject being rendered by using an array access.
And check if the object exists before.

Review

  • Code review CR +2
    • Markus Klein +2
    • Oliver Klee +1
    • Helmut Hummel +1
    • Philipp Gampe +1
  • Verified V +2
    • Markus Klein +2
    • Philipp Gampe +1

Issues 1

Files 1

Review log 26

Show 1 earlier messages
  1. Mr. Jenkins commented on patch set 1 08/23/13, 08:37

  1. Philipp Gampe voted on patch set 1 CR +1 08/23/13, 12:18

  2. Wouter Wolters voted on patch set 1 CR +1 11/24/13, 21:39

  3. Wouter Wolters wrote 11/24/13, 21:39

    Topic set to "performance".
  4. Frans Saris commented on patch set 1 11/24/13, 22:23

    ContentObjectRenderer.php:734

    Doesn't this give a warning when the array key $name doesn't exist?
  5. Jo Hasenau uploaded patch set 2 11/25/13, 15:29

  6. Jo Hasenau commented on patch set 2 11/25/13, 15:30

    Added a check for an existing array key and moved the declaration of the hookObj out of the if clause.
  7. Mr. Jenkins commented on patch set 2 11/25/13, 15:46

  8. Frans Saris commented on patch set 2 11/25/13, 16:04

    ContentObjectRenderer.php:735

    Maybe use !isEmpty($this->cObjHookObjectsArr[$name]) then you can drop the if($hookObj &&
  9. Markus Klein commented on patch set 2 11/25/13, 16:19

    ContentObjectRenderer.php:735 Reply

    +1 for Frans' suggestion. -1 for CGL: missing space after if
  10. Jo Hasenau uploaded patch set 3 11/25/13, 16:32

  11. Jo Hasenau commented on patch set 2 11/25/13, 16:33

    ContentObjectRenderer.php:735 Reply

    Done

    ContentObjectRenderer.php:735 Reply

    Done
  12. Mr. Jenkins commented on patch set 3 11/25/13, 16:51

  13. Frans Saris voted on patch set 3 CR +1 11/25/13, 17:16

  14. Markus Klein voted on patch set 3 CR +1 11/25/13, 17:37

  15. Philipp Gampe voted on patch set 3 CR +1 11/26/13, 11:40

  16. Helmut Hummel commented on patch set 3 V -1 CR -1 11/26/13, 12:03

    ContentObjectRenderer.php:735

    what is "isEmpty"?
  17. Jo Hasenau uploaded patch set 4 11/26/13, 13:19

  18. Jo Hasenau commented on patch set 4 11/26/13, 13:20

    I definitely do too many things with TypoScript ;-) At least PHP Storm did not complain about isEmpty though.
  19. Oliver Klee voted on patch set 4 CR +1 11/26/13, 13:29

  20. Mr. Jenkins commented on patch set 4 11/26/13, 13:35

  21. Philipp Gampe voted on patch set 4 V +1 CR +1 11/26/13, 14:46

  22. Markus Klein voted on patch set 4 CR +1 11/26/13, 15:54

  23. Helmut Hummel voted on patch set 4 CR +1 11/26/13, 16:48

  24. Markus Klein voted on patch set 4 V +2 CR +2 11/28/13, 23:53

  25. Markus Klein merged patch set 5 11/28/13, 23:53