nette / tracy

😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.
https://tracy.nette.org
Other
1.75k stars 218 forks source link

Tracy panel lazy loading #530

Open janbarasek opened 2 years ago

janbarasek commented 2 years ago

Hello,

As a package developer, I like to provide debug information to developers via the Tracy panel. However, getting some data takes a long time and is not necessary to do in every request (for example, mapping all entities in Doctrine).

I'd like to introduce the concept of lazy loading of panels in Tracy, which will compile their content after the panel is clicked.

I've been thinking about the concept of builds, and lazy loading should only work for panels that work in isolation from the current request and can always be retrieved for their content. For example, the panel would be called as a DIC service and so on (I would be very happy for more ideas on how this could work).

Also, panels should natively be able to be set to not be rendered during ajax. This then delays the loading of the whole page, even though I don't need the panel most of the time.

Thank you.