Review main Abandoned

28348[TASK] Avoid unnecessary queries for empty relations

Georg Ringer CR 0 V 0 Easy +1 −1 updated 05/03/14, 12:45

Commit message

Extend the check for '0' and not only empty fields to know
if there are any relations to fetch or not.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 16

  1. Mr. Jenkins commented on patch set 1 03/13/14, 13:39

  2. Georg Ringer updated the commit message in patch set 1 03/13/14, 14:05

  3. Marc Bastian Heinrichs wrote 03/13/14, 14:11

    Topic set to "extbase".
  4. Marc Bastian Heinrichs voted on patch set 2 CR +1 03/13/14, 14:12

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

  6. Stefan Neufeind commented on patch set 2 CR +1 03/13/14, 23:57

    Didn't manage to test this special-case though.
  7. Xavier Perseguers voted on patch set 2 V +1 CR +1 03/14/14, 07:49

  8. Pascal Dürsteler voted on patch set 2 CR +1 03/14/14, 08:00

  9. Felix Oertel commented on patch set 2 03/14/14, 19:59

    Not sure, but this relies on the reference count to be right, right? I don't like that, that thing is not reliable. I would much more like an additional query to check the mm for (real) related objects, instead of relying on a duplicated information. This problem gets less important when we hack http://forge.typo3.org/issues/55169 . This would only send one query for all objects in a storage. So 0 and empty values should not have an impact anymore.
  10. Markus Klein commented on patch set 2 03/15/14, 11:20

    I agree with Felix here. Please DO NOT rely on the refindex in general. Rarely an extension uses proper API so that the index is updated.
  11. Marc Bastian Heinrichs commented on patch set 2 CR -1 03/17/14, 16:24

    Markus, it's the reference count, that is stored in the field and nothing with reference index. But I agree to Felix. The count value in the field is not save to say that there is no referenced record.
  12. Markus Klein commented on patch set 2 CR -1 03/17/14, 18:43

    @MaBa: Well I was not precise enough ;-) But isn't this count also updated with the refindex update function?
  13. Marc Bastian Heinrichs commented on patch set 2 03/17/14, 19:12

    Nope, is handled inside the Datahandler for the Backend. It is also handled in Extbase\Persistence\Generic\Backend, but I think, it not save enough.
  14. Pascal Dürsteler commented on patch set 2 CR 0 03/18/14, 08:57

    Shouldn't then be the reference count be fixed first? Either we have one and it works, or we don't have one, but having one which "usually may not be reliable" feels a bit unlovely.
  15. Marc Bastian Heinrichs commented on patch set 2 03/18/14, 09:10

    The problem is, that it not complete in the hand of the framework, because you don't have to use the Extbase persistence or the Datahander.
  16. Felix Oertel abandoned the change 05/03/14, 12:45

    As discussed, we don't want to rely on the reference count.