Fork me on GitHub
973x250

Preloads - a visual aid (repost)

This is a repost from a previous article by Skenow. Because we will focus on this functionality in the near future, I thought it sensible to bring this article back into focus.

Our last exercise in core functionality was a deeper look at preloads, and I wanted to give you a little present to help bring it all together. So, I did it by writing a new preload just to display all the preload events as they were being triggered.

With this preload, you see debug messages throughout the page as each event triggers. Not every page triggers every event because some of them are attached to other processes, like loading HTML textareas. The code comments indicate where in the core to look for the specific events, if you're interested. There is one event (startCoreBoot) that triggers before the necessary language file loads to display a friendly debug message (that will be addressed in an upcoming patch). But, the basic information will be understood.

This preload can also serve as a template for your own preloads - just rename the file and class to match your needs, then customize the methods you wish to fire your process. Remove the other methods to keep the memory usage down and you're all set!

The comments are owned by the poster. We aren't responsible for their content.