WordPress.org

Forums

Customizr
Header image kills performance (13 posts)

  1. chrisp68
    Member
    Posted 1 year ago #

    Customizr v3.1.5 on WordPress 3.8

    When I add a logo image to include in the header, the page takes something like 14 seconds to respond. When I remove the logo (so just the site title shows in the top-left corner), the response is immediate.

    The image is 250x100 and I've tried PNGs and JPGs, with or without "force logo dimensions" checked ... with no luck.

    Has anyone else experienced this or have any insights?

    Thanks,
    Chris

  2. chappie
    Member
    Posted 1 year ago #

    Link?

  3. muggz
    Member
    Posted 1 year ago #

    I had this problem on my local windows box.

    The file:
    parts\class-header-header_main.php snags the img size somewhere around line 144 (depends on the version you use).

    I commented out the three:
    if ( @getimagesize ...
    list ...
    }
    lines above to correct.

  4. chrisp68
    Member
    Posted 1 year ago #

    Thanks for replies.

    @chappie
    Unfortunately, this is on a non-live site at the moment. I'm trying to work with the host to move a site onto a PHP v5.3.27 environment (from PHP v5.2.17) because of some issues with "Suhosin". The site seems to work ok on the PHP 5.2.17 box but then this 14 second thing happens on the 5.3.27 box. So basically, there's no public link to this site for me to share.

    I used the P3 plugin to get an idea of where the issue was and it put it all down to loading the theme. I confirmed that this still happens with all plugins deactivated.

    @muggz
    Thanks for that ... I'd got to roughly that area too, ready to do some trial and error over the weekend (not a PHP guru). I'm reticent to go the child theme route at the moment because some of the new features coming look quite useful to me. For the moment though, I think that is the way I'll have to go, but I'd really like to understand what the cause is (can't just be my problem on a shared hosting platform can it?) and get that fixed instead.

  5. chappie
    Member
    Posted 1 year ago #

    Have you checked out the ReadMe to see what has been changed in the latest version of the theme?

    http://themes.svn.wordpress.org/customizr/3.1.5/readme.txt

  6. chrisp68
    Member
    Posted 1 year ago #

    Yes, I gave that a glance before upgrading. Thanks.

    I've commented out the lines muggz suggested in a child theme and it works fine now. Thinking about my situation here and the one muggz talked about, it could be something to do with getimagesize for a remote url (I'm using an amended hosts file to access the target site - if the url to the logo is absolute then it's headed off to the live site for the image). But I'm guessing here.

    I'll restore the live backup to the 5.3.27 account, apply the child template and then get the host to switch to it over. Then I can try switching back to the native Customizr theme to see how it goes.

    I'll post back either way ... hopefully with some success.

  7. muggz
    Member
    Posted 1 year ago #

    @chrisp68

    I plan on looking into why the slowdown takes place on my local PHP Version 5.3.26 only, (I was going to look @ memory allocation since it started happening only on the large full-screen logo) but have higher priorities right now.

    Glad to hear it fixed the slowdown for you as well.

  8. chrisp68
    Member
    Posted 1 year ago #

    OK, the site has been switched to the new server and the base Customizr theme now works perfectly ... no noticeable delay compared to the child theme (with the getimagesize lines commented out).

    For the record, the story went something like this ...

    - live domain pointed to one server
    - copy of the site was created on a second server (to become live server)
    - hosts file on my PC was used to redirect the domain to the new server for testing
    - getimagesize calls resulted in a 14 second delay in loading EVERY web page while in this configuration
    - when the domain was switched to the new server, the getimagesize calls produced no delay at all.

    The only conclusions I can draw are that getimagesize doesn't like non-local references (maybe someone with a better PHP background can confirm) or that the local environment got itself a little confused about how to resolve the url (the hosting package was bound to the domain name so it may have made certain assumptions when resolving domain names and the hosts file obviously wouldn't have come into play).

    I hope this can help someone else that encounters the same problem :)

    Cheers,
    Chris

  9. rdellconsulting
    Member
    Posted 1 year ago #

    Thanks for the analysis Chris. That's so helpful to others.

  10. nikeo
    Member
    Theme Author

    Posted 1 year ago #

    Hi,
    getimagesize() can work for local or remote files :
    http://fr.php.net/manual/en/function.getimagesize.php

    For remote files, some performance issues can be seen, but there are optimizations possible as reported here.
    http://php.net/manual/en/function.getimagesize.php#88793

    I will think about a fix for that.
    Thanks for reporting and enjoy the theme!

  11. chrisp68
    Member
    Posted 1 year ago #

    @nikeo
    My situation was obviously not typical, I suspect it had more to do with idiosyncrasies of the hosting environment resolving the url as this wasn't a large file by any means (250x100 PNG).

    Having said that, obviously any tweaks on performance for large files will be welcomed by some :)

    Excellent theme, thank you for making it available!

    Chris

  12. ElectricFeet
    Member
    Posted 1 year ago #

    @chrisp68 I wonder what difference using wp_get_attachment_image_src would make?

  13. Tion
    Member
    Posted 1 year ago #

    i getting same problem now..

    there are PHP v5.5.11 in my server

    but my site too slow..

    i try to make small size.. so, now 3.5kbye png size 250x100 px

    file size more than small, that fast. but sometime slow..

    url:
    http://new.kkmc.kr

    Thank you..

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic