We use resource_conflict in code to build schedules, so it can be called thousands of times in a loop.

The patch to follow will add cacheing to avoid repetitive SQL queries.

Comments

deviantintegral’s picture

This sounds like a good idea. I'm not sure basic caching would provide much of a performance improvement over the regular query cache. Are you looking at static caching, or storing cached objects? What would they be keyed by?

If it makes writing a patch easier, I'm completely OK with requiring ctools so we can use ctools_static().

deviantintegral’s picture

Title: Add cacheing » Add caching of conflict checking
glennpratt’s picture

StatusFileSize
new6.64 KB

Whoops! Guess I wasn't paying attention, forgot to attach a patch.

I haven't seen any bugs with our scheduler since I wrote this, the cacheing is aggressive because we we're getting killed by SQL load. It may need to be toned down a bit.

Is ctools_static like D7 drupal_static? If so, that will work great! :)

joelpittet’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing this due to D6 being EOL and to clean-up the queue. Please feel free to let me know if you think it is relevant to D7 and I'll re-open.