Magento

What is the first event fired in Magento?

controller_front_init_before Technically, it’s resource_get_tablename, but the first usable event is controller_front_init_before. But this is also a bit of a trick question.  controller_front_init_before is ONLY triggered from the global area.  The first usable event in the frontend (or adminhtml) area is controller_action_predispatch.  core_locale_set_locale might also be a possibility because it is set when the area is loaded, but IContinue Reading “What is the first event fired in Magento?”

Magento Performance PHP

4 charts that are guaranteed to make you a better performance detective

I was giving the Magento Performance and Optimization for System Administrator’s course today and I said something that is either borderline brilliant, stupid, or common knowledge.  What I said was something along the lines of “finding performance problems is about finding a) correlations, or b) deviations“.  In other words, a big part of determining aContinue Reading “4 charts that are guaranteed to make you a better performance detective”

Magento

Magento memory utilization for backend work

I was talking with a colleague about my previous blog post on memory utilization in Magento and he noted that I had not taken into account backend tasks.  Which he was right about.  So I decided to take a second look at the memory usage from the point of view of the admin UI. ButContinue Reading “Magento memory utilization for backend work”

Dependency Injection Magento

(Basic) Configuring the Magento 2 Dependency Injection Container

My previous blog post on the DIC (Dependency Injection Container) in Magento 2 covered just some basics of using the Magento 2 DIC.  The purpose of that post was to, perhaps, make you less apprehensive about using DI combined with the DIC in Magento 2.  However, in this post I want to go a littleContinue Reading “(Basic) Configuring the Magento 2 Dependency Injection Container”

Dependency Injection Magento

(Starting) Using Dependency Injection in Magento 2

One of the biggest switches you will experience when moving from Magento 1 to Magento 2 is inversion of control.  This is a very different concept to get used to but once you have it you will be a very happy person.  Maybe.  At least I was.  Understanding how to use dependency injection and understandingContinue Reading “(Starting) Using Dependency Injection in Magento 2”

Magento

How much memory does Magento use?

So, I was teaching the Magento Performance for System Administrators class the other day.  I’ve delivered the class several times but this is the first time that somebody asked me “How much memory does Magento actually use?”  Now, I know what you’re supposed to set it at, but I’ve never measured actual usage.  So IContinue Reading “How much memory does Magento use?”

Magento Performance

How much does logging affect performance?

So, I was having a discussion with a person I respect about logging and they noted that often logging poses a prohibitive cost from a performance perspective.  This seemed a little odd to me and so I decided to run a quick series of benchmarks on my own system.  Following is the code I used. require_onceContinue Reading “How much does logging affect performance?”