Review main Merged

28419[BUGFIX] Cached class loader misses are not considered

Thomas Maroschik CR +2 V +2 Normal +31 −24 updated 03/20/14, 19:06

Commit message

The class loader caches if it doesn't find a class name
for subsequent calls. But currently it only checks for
NULL results from the cache and not the empty strings
returned from the cache and thus tries to resolve the
non existing class name over and over again.

The fix converts the empty string to a NULL and
changes the semantics of NULL to FALSE in the class
loader.

Review

  • Code review CR +2
    • Markus Klein +2
    • Alexander Opitz +1
  • Verified V +2
    • Markus Klein +2
    • Alexander Opitz +1

Files 2

Review log 51

Show 26 earlier messages
  1. Thomas Maroschik updated the commit message in patch set 1 03/15/14, 12:31

  2. Thomas Maroschik updated the commit message in patch set 2 03/15/14, 12:32

  3. Thomas Maroschik wrote 03/15/14, 12:50

    Topic set to "performance".
  4. Mr. Jenkins commented on patch set 1 CR -1 V -1 03/15/14, 13:43

  5. Mr. Jenkins commented on patch set 2 03/15/14, 13:47

  6. Mr. Jenkins commented on patch set 3 03/15/14, 14:18

  7. Wouter Wolters voted on patch set 3 CR +1 03/15/14, 15:35

  8. Steffen Ritter commented on patch set 3 CR +1 03/15/14, 17:00

    reads fine, not sure how to test.
  9. Helmut Hummel commented on patch set 3 CR -1 03/16/14, 10:22

    The check has to be done earlier, so that the class info is not rebuilt when the class has not been found before.
  10. Helmut Hummel commented on patch set 3 03/16/14, 10:25

    Proposal: $this->getClassLoadingInformationFromCache($cacheEntryIdentifier); returns FALSE on cache miss and NULL or array on cache hit. Then not build class information if value is NULL
  11. Thomas Maroschik commented on patch set 3 03/16/14, 10:28

    Would be OK from my perspective as explode also returns false if something is wrong with the cache entry.
  12. Thomas Maroschik uploaded patch set 4 03/16/14, 10:42

  13. Thomas Maroschik uploaded patch set 5 03/16/14, 10:44

  14. Mr. Jenkins commented on patch set 4 03/16/14, 11:00

  15. Helmut Hummel commented on patch set 5 CR +1 03/16/14, 11:04

    Can't do a full review on my phone, but as far as I can see, it looks good now. thanks!
  16. Mr. Jenkins commented on patch set 5 03/16/14, 11:13

  17. Markus Klein commented on patch set 5 CR +1 03/16/14, 12:21

    All lowercase false -> FALSE
    caches -> crashes?

    ClassLoader.php:187

    FALSE|NULL
  18. Markus Klein uploaded patch set 6 03/18/14, 10:28

  19. Markus Klein updated the commit message in patch set 6 03/18/14, 10:34

  20. Markus Klein voted on patch set 7 CR +1 03/18/14, 10:34

  21. Mr. Jenkins commented on patch set 6 03/18/14, 11:12

  22. Mr. Jenkins commented on patch set 7 03/18/14, 11:16

  23. Oliver Klee commented on patch set 7 CR -1 03/18/14, 11:45

    ClassLoader.php:200

    null -> NULL

    ClassLoader.php:366

    null -> FALSE
  24. Markus Klein uploaded patch set 8 03/18/14, 12:14

  25. Markus Klein commented on patch set 8 CR +1 03/18/14, 12:14

    NULL fixed
  26. Oliver Klee voted on patch set 8 CR +1 03/18/14, 12:21

  1. Mr. Jenkins commented on patch set 8 03/18/14, 12:43

  2. Thomas Maroschik voted on patch set 8 CR +1 03/18/14, 13:13

  3. Wouter Wolters commented on patch set 8 CR -1 03/18/14, 19:01

    ClassLoader.php:366

    FALSE
  4. Markus Klein commented on patch set 8 03/18/14, 19:23

    ClassLoader.php:366 Reply

    Done
  5. Markus Klein uploaded patch set 9 03/18/14, 19:23

  6. Markus Klein voted on patch set 9 CR +1 03/18/14, 19:24

  7. Oliver Klee voted on patch set 9 CR +1 03/18/14, 19:24

  8. Wouter Wolters voted on patch set 9 CR +1 03/18/14, 19:28

  9. Mr. Jenkins commented on patch set 9 03/18/14, 19:41

  10. Thomas Maroschik voted on patch set 9 CR +1 03/18/14, 21:18

  11. Markus Klein commented on patch set 9 CR -1 03/20/14, 16:31

    ClassLoader.php:231

    can return NULL too

    ClassLoader.php:241

    can be NULL too
  12. Ernesto Baschny commented on patch set 9 03/20/14, 16:40

    Markus will further work on this, maybe we can get also the issues #57094 and #56993 solved with it. Thanks!
  13. Markus Klein uploaded patch set 10 03/20/14, 16:40

  14. Mr. Jenkins commented on patch set 10 03/20/14, 16:49

  15. Markus Klein voted on patch set 10 CR +1 03/20/14, 17:01

  16. Markus Klein uploaded patch set 11 03/20/14, 17:07

  17. Markus Klein commented on patch set 11 CR +1 03/20/14, 17:07

    Just fixed one more phpdoc mistake
  18. Markus Klein voted on patch set 11 V +1 03/20/14, 17:09

  19. Mr. Jenkins commented on patch set 11 03/20/14, 17:17

  20. Alexander Opitz voted on patch set 11 V +1 CR +1 03/20/14, 17:21

  21. Markus Klein voted on patch set 11 V +2 CR +2 03/20/14, 17:30

  22. Markus Klein merged patch set 12 03/20/14, 17:30

  23. Helmut Hummel commented on patch set 12 03/20/14, 18:24

    -1 Post review

    ClassLoader.php:213

    Returning FALSE here, does introduce the bug again which should have been fixed with this merge!
  24. Markus Klein commented on patch set 12 03/20/14, 19:03

    ClassLoader.php:213 Reply

    Actually the commit message says "cache misses". These are considered. This case is about cache hit, but missing class. https://review.typo3.org/28577
  25. Markus Klein commented on patch set 12 03/20/14, 19:06

    ClassLoader.php:213 Reply

    Well I understood the header wrong^^ "Cached class loader misses are not considered" means "Cached information about missing classes" ;-) So yes, should have been fixed here. will be fixed with the other patch.