Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295845

Optimize getCommentedEntity()

$
0
0

Click on the right hand side of https://www.dropbox.com/s/dqc7duebdzzr88d/result-node1-no-page-cache-fla... in the bar called Drupal\comment\CommentLazyBuilders::renderLinks. There you will see a wide bar for getCommentedEntity(). This method can be optimized to pull right from persistent entity cache if available.

Incidentally, I notice that buildLinks() calls $entity->getCommentedEntityTypeId() and $entity->getCommentedEntityId() despite having been passed in the commented entity.

Why this issue should be an rc target

This change will enable a significant performance improvement. @todo What are the potential disruptions, if any?FIxed test :)

Remaining tasks

- Once this is committed in the og project the getFieldValue method can be remove. See https://github.com/Gizra/og/pull/555


Viewing all articles
Browse latest Browse all 295845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>