Shouldn't it be more efficient if only nodeblock saved something in database only when a node is going to provide a block?
I also want to raise the call to _nodeblock_rehash_all() (which comes from a patch I wrote, I think): I think it is useless as long as the node is not provided as block, and it would be a great gain of time if it was called only when needed.
Regards,
David
Comments
Comment #1
Johnny vd Laar commentedThanks for spotting this. I think it's fixed now:
http://drupalcode.org/project/nodeblock.git/blobdiff/23ab1cbf1d72d42d77d...
Comment #2
David Stosik commentedWow, thanks for the fast fix!
I looked at the code a bit more, and realized that _nodeblock_rehash_all() is only called on insert, and not called anymore on update and delete. Is it an attempt to optimize performances?
I think it's very good, but if you think that it's better to update and delete manually the blocks table on node update and delete, wouldn't it be good to do the same on insert, too (and forget the function _nodeblock_rehash_all() that I wrote, sigh... :D )?
David
Comment #3
Johnny vd Laar commentedYeah I was thinking about that too. That might be a good performance optimization I will add that as well.