I'm thinking of building a submodule to render_cache that will provide caching details that wrap render_cache'd elements.

This would be a useful debugging utility since the render cache functionality set is growing, which will make maintenance and understanding of the caching impacts more difficult to discern.

I'm thinking something similar to Panels, Why so slow? that would show the cache ID (pre-hashing) and possibly the render time around each cached element.

Fabian, what do you think?

Comments

fabianx’s picture

That is a great idea.

I suggest we however put

<!-- $cids, $hash, $cid -->

comments around the markup using standard #prefix / #suffix commands for the first iteration.

I personally use error_log(print_r()) all the time with the above to improve the performance.

Comments worked for us very well in D8 for the twig initiative and people love to look at the markup in my experience.

I have not looked at panels why so slow, yet.

Thanks!

fabianx’s picture

Wow, the output of panels - why slow? is awesome!

That looks really useful!

fabianx’s picture

Title: Render cache UI » Render Cache Inspection Tools - Provide debugging tools similar to panels, why so slow?
Issue summary: View changes
fabianx’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

  • Fabianx committed fd36101 on
    Issue #2091193: Added some debug output for now via...

  • Fabianx committed fd36101 on DIC
    Issue #2091193: Added some debug output for now via...
geek-merlin’s picture

For the records: This 2.x feature is enabled by setting render_cache_debug_output=1 and writes stuff to your HTML that you can grep with "<!-- START RENDER".