Improved Pageload

2»

Comments

  • Thanks for the quick reply!

    I've uninstalled my cache plugin (w3total cache) and have been running Gmetrix and Pindom to view the waterfalls. Style.php keep coming up at 3+ seconds for me.


    All images have been smushed but my other sites that are just a graphically heavy, with a fair few plugins ALL load at under 5 seconds with even cheaper hosting.

    Cheers,
    Alex
  • Any style .php file is a major resource hog as described earlier in my posts. (for the theme but also for Rev slider)

    there's 2 php files in this theme.. other is something with color in it (just above styles.php)

    try and make the 2 files into 1 AND make them static (which includes removing the php parts BESIDES the header style part.. loader.php inclusion etc --> remove).

    gtmetrix should give you some static outcome for the php files.. use it instead of all the "if" statements
  • We previously hacked up the style.php file in MuffinGroup's Nollie Theme because of performance issues. We got that theme down to a 785ms loading for the homepage and 99/100 on Pingdom. If you are committed to a specific color scheme, like we were, we took the designated styling code from within the style.php file and put it into a new css file, then changed the call for the style.php within the header.php file to point to the new css file we made. This eliminated the php file and made a huge difference for us.

    Considering themes are built to a broad audience to select a variety of options, such aspects, like the style.php is necessary. BUT... from the user-end, if you are committed to a specific setup/color scheme/etc. It is best to configure as you like then strip out what is un-necessary to clean up your theme. Much more work, but creates a more performance-friendly website in the end. Hope that helps you guys.

    We have not gotten to that point yet for this theme. But, do plan on stripping out various things (including all the extra css we will not need) when the time is right for us to do it.
  • edited July 2014
    Here is a current Pingdom Run for our current site on the BeTheme... http://tools.pingdom.com/fpt/#!/dosUw/clearsidemedia.com

    At this point, we are running on a Basic VPS, MaxCDN w/ W3 Total Cache. 2.67 sec load time and 87/100 score is reasonable; but, we haven't touched our site for performance yet.

    EDIT: style.php and style-colors.php combined are over a second loading time and we are still only at 2.67
  • Clearsidemediaco and mtiggelaar can you please send me some tips on how to speed up the pageload time? I tried combining 2php files into 1 and using static css but then the style of the theme changed to default (blue as far as I remember), and I wanted orange... any help would be appreciated.
  • Well if you want orange make sure you export the static css into the orange theme you want.
    Basically all comes down to setting the right CSS's in the right order.

    the url i given before will somewhat help you with atleast finding the right CSS's 
    it then comes down to the right order. some need to be higher priority then others.
  • @mtiggelaar

    Any chance you can share these updated files with me also, please? Thank you very much.
  • edited December 2014
    @mtiggelaar Thanks for sharing all your experiments and results.

    @muffingroup: With the new versions (and features like the 'Static CSS' option in 'Getting Started - Advanced'), are the tips from this thread still applicable?

    Here's a sample post from my blog: http://www.mbacrystalball.com/blog/2014/12/23/one-year-mba-iim-indore-epgp/

    After I turn on the static css option, it still loads a lot of independent css files.

    In fact, the style.css file loads 2 versions (style.css?ver=4.1 and style.css?ver=5.6). [Edited: Ignore this line. The second style.css was from another plugin]

    And I'm not sure if I need all those to be loaded, as my site is very simple (no sliders, no big images, no fancy features).

    Questions:

    1. Is there a setting in the latest BeTheme version to compress all of them into one file? If not, what's the best way to manually combine them (i.e. which specific file to tweak and update)?

    2. GTMetrix suggests 'Remove query strings from static resources' as a high priority item, and lists around 40 files that have this 'issue'. Is there anyway to remove the query strings to improve the speed, without introducing additional problems?

  • @skatmcb We have no idea of those modifications works. If you want to try them, then you should follow all instructions provided by @mtiggelaar. But of course, only one file should be imported. IF you have 2 style.css files then we have no idea what you exactly did because we tested it already and with our theme only one file is imported.

    1. We do not have anything like that and also we do not now any way to combine them into one because in our opinion it is not possible at all.

    2. This is also not possible. Each "wordpress product" must be written in accordance to wp api and best wordpress practices what means that those ?ver=xxx are necessary and can't be removed. As you can see, those strings comes not only with our theme but with other most popular plugins as well.

    Thanks for understanding!
  • Hello,

    Some of my modifications are no longer valid as they already write it to static file now (makes life alot more easy).

    I also agree with Muffingroup that you can't combind all into 1, however some files (css/js) are very small i would recommend combinding those into 1 single file.

    The goal should be to not have too many includes but also not any includes that are too big, you will need to seek a balance in there.

    the ?ver=xxx  i know wordpress does this, but many caching related aspects can get upset by that.
    you can simply remove them by adding a few lines in your theme functions.php:
    function remove_cssjs_ver( $src ) {
    if( strpos( $src, '?ver=' ) )
    $src = remove_query_arg( 'ver', $src );
    return $src;
    }
    add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
    add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );

    (be careful as i don't know if this forum modifies any codes or not, i did not find any <code> buttons)

    In the very end: each site is unique, a theme like BeTheme is great to make it instantly look good, but if you truly want to optimize your site for speed you will need to slice away some aspects that simply do not apply to your site (which is really different from site to site).

    BeTheme did solve the most troubeling loading time by adding that static feature.
  • Thanks @mtiggelaar for above code related with version queries :) We got it in future plans and we hope that your function above will be helpful. We'll test it soon.

    However, as you mentioned, most of the problems has been fixed when we added "static feature". Gtmetrix thinks the same way because website speed went up what you can see at http://gtmetrix.com/reports/themes.muffingroup.com/YXAcxKG1
  • edited December 2014
    @mtiggelaar,

    Thanks for your insights!

    I've seen variations of that code on various sites with differing parameters. Good to hear that @muffingroup plans to incorporate the query string removal feature in the next BeTheme release. I should probably wait for that.

    The static CSS feature is fantastic. Saves a lot of headache. I'm sure many BeTheme users will benefit from the query string feature as well.

    On the other topic about about combining files, I was trying to see if I could send a PM (to avoid confusing others with site specific discussions). But I guess these speed related discussions will help others as well, so why not continue here. Unless @muffingroup thinks this needs to be taken offline.

    Can you mention which small css/js files you combined into one and which parent files you had to update?
  • please can you give me those files?
    tyvm
  • Hi, reviving this thread because I see there's a TON of information on improving my website but I really don't know how to do it.. Is there anybody that will help me with this? I'll provide you value in whatever way in return. Thanks
  • I just did a GTMetrix and it suggests the following: But the website and colour themes are all set, there's nothing actually on it yet, I'm optimizing it as I build it if that makes sense, every single image will be tinypng'ed .etc 
    https://gyazo.com/13ad02fc1d19b1fe8bf1a4c5330ad5e6
  • @LUMABranding We do not have any solution to improve these both unfortunately.
Sign In or Register to comment.