localgovdrupal/localgov_base

Disabled blocks get rendered unnecessarily

Closed this issue · 1 comments

Any blocks that are placed in the 'Disabled' region get rendered, even though they're never displayed.

I've been debugging some performance issues on H&F's upcoming LGD site. One of the things that I ran into was that a couple of blocks that made calls to external services on render were making those calls on every single page load, despite the face that they were assigned to the disabled region and should therefore not be used.

I traced this through to localgov_base_preprocess_page(), which turned out to be rendering the disabled region as part of its checks to see which of the page's regions are active, so I've stopped it doing that.