Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Noticed that node_cron() is quite slow with a lot of nodes and and we actually don't use search.module, so what it is doing is pointless.
Proposed resolution
Add a moduleExists() check for search around it.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#1 | 2484667-node_cron-check-1.patch | 1.51 KB | joshi.rohit100 |
Comments
Comment #1
joshi.rohit100Comment #2
BerdirThanks, looks good. We could add a test that runs the code without search module enabled and then verifies that state wasn't set, but I'm not sure if that's really worth it?
Comment #3
xjmNice catch. Agreed that a test isn't really necessary.
As a performance improvement, this issue is a prioritized change as per https://www.drupal.org/core/beta-changes and its benefits outweigh any disruption. Committed and pushed to 8.0.x. Thanks @Berdir and @joshi.rohit100!
Comment #5
joshi.rohit100Do we need the same for comment ?
Comment #6
BerdirActually yes, that seems like a good idea and same problem. Want to open an issue?
Comment #7
joshi.rohit100Yes thats the question. Should it be in this issue as it is related or separate ? :)
Comment #8
BerdirNew issue as this one has been committed already.
Comment #9
joshi.rohit100Created new issue https://www.drupal.org/node/2485307