I have created a view and put it on a custom page using panels.

Sadly my query is too complicated and the page times out after about 10 seconds. On top of this i wanted my page to provide a 'loading' indicator to provide some feedback.

Now i am aware of batch api as being the most reasonable solution, at what stage can i get my view query to execute a batch run? I have thought about hook_views_pre_execute() but i think this is too late.

Has anyone any idea how to process a page load with batch api, or an alternative solution?

  • The batch API is usually for large operations of data, not rendering/retrieval. It sounds like you have a Views query performance/optimization problem. Have you determined the cause of the page out? OOM? Max CPU Time?
    – Shawn Conn
    Oct 23, 2015 at 3:50
  • I would assume it is caused by PHP memory limit, and was thinking batch was the only way to do it. The query is quite complicated and haven't seen a way to optimise it much.
    – Key
    Oct 23, 2015 at 8:27


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.