A block rehash is very expensive and only necessary if a new block exists AND you're going to change something in the NLB list. The combination of those makes a very small chance. It's too expensive for that IMO. The form could load 1/3 - 1/2 sec faster without that block rehash. That's pretty damn good for a node form.

I don't know how to ensure a fresh blocks list without it though. Unfortunately block.module doesn't rehash blocks with cron. You could add that...

Comments

Johnny vd Laar’s picture

I don't think it's NLB's responsibility to make sure that the block list is up to date.

A cache clear does rebuild the block hash. So I guess it would be okay to remove the rehash and add a description to the content type form that you need to flush cache if the block list is incomplete.

rudiedirkx’s picture

Going to the blocks admin page does a rehash too and that's much faster, but I guess that's up to the user. Sounds perfect:

add a description to the content type form that you need to flush cache if the block list is incomplete

Do it.

Johnny vd Laar’s picture

Status: Active » Closed (works as designed)

There is no function that returns a block list and context module and drupal core block admin page do this as well. So I think this is the common way to do this. So I will not change this.