1 Reply Latest reply on Feb 14, 2019 8:10 PM by Sanford Whiteman

    Munchkin code slowing site down?

    Natalie Skarzynski

      Now that our site has been switched to mobile-first Google indexing, speed has become even more important. In analyzing the load times of different page elements, the biggest (slowest) offenders are always Munchkin code. Obviously Munchkin is resource-intensive because of all the work it's doing, but we're wondering if anyone else seeing a similar issue, and have any recommendations to mitigate?

        • Re: Munchkin code slowing site down?
          Sanford Whiteman

          Let's not be alarmist now. It adds to FUD when an automated tool has merely reported  "this network request is the slowest on your page". Something must always be the slowest, by definition.


          Automated tools are not capable of determining whether the relative performance actually matters. The same goes for preposterous automated security checks.


          On the other hand, it's not really true that Munchkin is doing a lot of "work".  The load time refers to the time to (asynchronously) load the Munchkin bootstrapper and (again asynchronously) load the current Munchkin library. Neither of these loads has any user-facing impact at all, unless you're using an old-school onload (as opposed to DOMContentLoaded) event in some other essential JS, which is itself a bad practice.


          A vital way to reduce the user-facing performance impact of Munchkin is to turn off click tracking (add class="mchNoDecorate" to links, or at least to most links). You must be acutely aware of the consequences of doing this.

          1 of 1 people found this helpful