• Resolved therealgilles

    (@chamois_blanc)


    Hello again ??

    Wondering if there is a specific method used to merge multiple JS files together. I’ve been looking at site loading performance issues (specifically anything contributing to blocking time) and notice that a specific line in js_composer.min.js seems to contribute to a forced reflow.

    The line pointed out is the first one below:

    document.documentElement.className += " js_active ",
    document.documentElement.className += "ontouchstart"in document.documentElement ? " vc_mobile " : " vc_desktop ",
    function() {
      for (var prefix = ["-webkit-", "-moz-", "-ms-", "-o-", ""], i = 0; i < prefix.length; i++)
        prefix[i] + "transform"in document.documentElement.style && (document.documentElement.className += " vc_transform ")
    }(),

    This is actually the first line in the js_composer.min.js file, but when grouping by MMR, it ends up behind a lot of other JS code. It made me wonder if it would be more efficient to have it at the top of the file.

    I guess maybe I could add this file to the exclusion list and see if it makes any difference.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter therealgilles

    (@chamois_blanc)

    Gave it a try, did not change anything. Probably not the right way to improve performance.

    Plugin Author launchinteractive

    (@launchinteractive)

    You could try dequeuing the script and then enqueuing it again later or earlier by using a different priority.. it might help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JS file ordering when grouping’ is closed to new replies.