Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1219643

    Hi Everyone:

    Due to the issues I had in this post, I thought I’d check some other things related to the Performance tab in v4.7.4. For the first run, on the Performance tab, I disabled merging and compression of CSS and JS files, ticked the box to Delete Old CSS and JS files, and clicked Save All Changes. I use the Cache Enabler plugin, so I cleared its cache and verified it was empty by going to /wp-content/cache. I then clicked 5 different pages of my site, doing a Control+F5 refresh after landing on each one. I did a view source on each page to get the total number of code lines, then went to /wp-content/cache… to get the file size of each page. Finally I want to the \wp-content\uploads\dynamic_avia folder to get the list of files generated along with their sizes. Here’s the result of the first run.

     KB   Page    Lines of Code
     69   page1   489 lines
     57   page2   518
     59   page3   514
    148   page4   576
     57   page5   487
    ----
    390KB   Total Size
    Dynamic Avia Folder (sizes in KB)
      1   avia-gutenberg-dynamic-sos4net.css
      1   index.php
    125   child-theme.css
    ------------
    127KB   Total Size

    Next I turned ON merging and compression of CSS and JS files, left everything else the same, cleared the Cache Enabler cache, and hit the same 5 pages again the same way as above. What I expected to see was fewer lines of HTML code in the view source and a reduced file size for each page. What I found was unexpected to say the least.

    As you can see below, each individual page had at least 1 more line of HTML code and a larger–not smaller–file size. In fact the total size of the 5 pages actually is 20% GREATER than without merging and compression. On top of all that, there are now 2 extra, relatively large files in the \wp-content\uploads\dynamic_avia folder that must be loaded, presumably along with each of the cached pages.

     KB   Page#   # lines of code
     88   page1    490 lines
     76   page2    519
     78   page3    515
    149   page4    578
     76   page5    488
    ------------
    467KB   Total Size
    Dynamic Avia Folder (sizes in KB)
      1    avia-gutenberg-dynamic-sos4net.css
      1    index.php
    125   child-theme.css
    351   avia-merged-styles-2857818a6f5549b84cd754f942f7b067.css
    179   avia-footer-scripts-53f7a32ff5ee8fd511c47a7a0d0734e2.js
    ------------
    657KB   Total Size

    Perhaps I’m not understanding what file merging and compression are supposed to be doing. Can someone please explain how having to load more and larger files is supposed to be a performance improvement?

    • This topic was modified 4 years, 4 months ago by scotthco.
    #1219992

    Hey scotthco,

    I’m not sure exactly how you did you test, but if file compression is not active then a lot more CSS files will be loaded instead of only child-theme.css. Maybe you could test the performance of your site a dedicated performance tool instead?

    Best regards,
    Rikard

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.