There is no need to load the full license entity, as its' wrapper is only needed when the PayPal status is not active (in order to revoke the license). This should give a small performance gain.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drupov created an issue. See original summary.

drupov’s picture

Here's a patch to make the query more performant.

drupov’s picture

Title: On hook_cron load full license entity only when payment is one of Pending, Cancelled, Suspended, Expired » Make query in hook_cron more performant