There is a hook panels_mini_block_list_alter which loads all mini panels to check that page contexts match required contexts of mini panel.
It calls page_manager_get_current_page() inside and it seems never work as expected because $current_page['contexts'] are always empty array.

$current_page =>  (Array, 6 elements)
name (String, 15 characters ) page-front_page
task (Array, 25 elements)
subtask (Array, 15 elements)
contexts (Array, 0 elements)
arguments (Array, 0 elements)
handler (Object) stdClass

I can find all configured context at
$current_page['handler']->conf['display']->context

I use mini panels on my project extensively, and lots of them have required context and these contexts are configured in page variants.

Interesting thing that if i comment panels_mini_block_list_alter() function entirely panels UI still hide all mini panels that does not match contexts.

I also tried to profile site with xhprof and it seems that this hook waists 25% of page load time, i attached it to ticket.

If anyone knows what is the purpose of this function please make comments, it may be here for historical reasons.
As a solution i expect to execute it only when some conditions appear or delete if is not needed.

CommentFileSizeAuthor
panels_mini_xhprof.png10.08 KBdmitriy.pokhodenko
Support from Acquia helps fund testing for Drupal Acquia logo