Activity Stream
48,167 MEMBERS
62952 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 9 of 9
  1.     
    #1
    Member
    Website's:
    maxneeds.info

    Angry PHP getimagesize is freaking slow !

    Hi there !
    I've realized that the getimagesize function adds min 10 sec to the loading of my site !
    So it would be really cool if it is possible to replace it with much faster function (i've heard that the dimensions of the image are in the first bytes).
    Or atleast is there way to load firstly the entire page and then getting image size and loading img...
    Porsche_maniak Reviewed by Porsche_maniak on . PHP getimagesize is freaking slow ! Hi there ! I've realized that the getimagesize function adds min 10 sec to the loading of my site ! So it would be really cool if it is possible to replace it with much faster function (i've heard that the dimensions of the image are in the first bytes). Or atleast is there way to load firstly the entire page and then getting image size and loading img... Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Cache the result in your database. Much faster.

  4.     
    #3
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    10 seconds :/ that's ridiculous, try update the library, and create a seperate script away from your application to test it.

    Your site should never take more then .500ms to compile, anything else is your GUI data such as images,css,html and other factors.
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  5.     
    #4
    Member
    Quote Originally Posted by litewarez View Post
    Your site should never take more then .500ms to compile, anything else is your GUI data such as images,css,html and other factors.
    agreed, 10 sec is hilarious !

  6.     
    #5
    Member
    Website's:
    maxneeds.info
    The images are not hosted on the local mashine.
    That's why getimagesize is so slow.

    There's the GD lib info :
    Code: 
    array(12) { ["GD Version"]=> string(27) "bundled (2.0.34 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["T1Lib Support"]=> bool(true) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPEG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XPM Support"]=> bool(false) ["XBM Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(true) }
    Using PHP 5.3.1

  7.     
    #6
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    So your loading an image from another server via HTTP ? if so then your doing it wrong :/
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  8.     
    #7
    Member
    Website's:
    maxneeds.info
    Code: 
     $img_size = @getimagesize( $str_url );
              if ( $img_size !== false ) {
                $width = $img_size[0];
                $height = $img_size[1];
    where $str_url is the image url..
    And thats in the beggining of the page.
    And i don't think that i can move it at the bottom so it will load last ?

  9.     
    #8
    Member
    Website's:
    Tastro.org HDTVXviDLOL.com EpisodeSeasons.com FileBorg.org W-47.com
    i agree with magca. cache it somehow... so that when people visits your site the php script only reads from the database...

    it should do all this stuff only when you insert it.
    LE with your pr2 site? <a href="http://tastro.org/">Tastro.org</a> or link exchance with our category page: <a href="http://tastro.org/i/hdtv">HDTV</a> | <a href="http://tastro.org/i/dvdrip">DVDRip</a> | <a href="http://tastro.org/i/r5">R5</a> | <a href="http://tastro.org/i/bdrip">BDRip</a> | <a href="http://tastro.org/i/brrip">BRRip</a>

  10.     
    #9
    Member
    Website's:
    maxneeds.info
    Hmm or maybe to store thumbnails from the remote images and if there is thumbnail show it first, on dblclick use getimagesize and expand the real image to its dimensions.
    But it will be hell long coding.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Very slow
    By MR.KiDO in forum vBulletin
    Replies: 6
    Last Post: 3rd Mar 2014, 06:00 PM
  2. Red panda freaking out over a pumpkin.
    By ibby in forum General Discussion
    Replies: 0
    Last Post: 15th Mar 2012, 02:49 AM
  3. OVH VPS Slow
    By devio in forum Hosting Discussion
    Replies: 3
    Last Post: 30th Mar 2011, 03:34 PM
  4. KWWH Slow Down
    By iHate in forum Feedback and Suggestions
    Replies: 6
    Last Post: 9th Jan 2011, 06:36 PM
  5. WTH did RS did to their freaking site again :s
    By kohkindachi in forum General Discussion
    Replies: 10
    Last Post: 27th Sep 2010, 03:53 PM

Tags for this Thread

BE SOCIAL