Author Topic: My gallery NOT slow  (Read 6193 times)

0 Members and 1 Guest are viewing this topic.

Offline incomode

  • Pre-Newbie
  • Posts: 1
    • View Profile
My gallery NOT slow
« on: May 01, 2005, 01:18:39 PM »
When i insert a (big) remote file the gallery was very slow.

I fix this bug.
Replace getimagesize in function.php
with filesize.

Now is very fast.

bye

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
Re: My gallery NOT slow
« Reply #1 on: July 24, 2006, 09:14:46 PM »
Im having the same problem with the Remote images slowing the gallery down bigtime.
Most of my pics are locally hosted , but i use the remote image function for Videos.
And i use locally hosted thumbnails.

As suggested above , i replaced this:
Code: [Select]
   if (!get_file_path($thumb_file_name, "thumb", $cat_id, 0, 0)) {

     $file_src = ICON_PATH."/".get_file_extension($media_file_name).".gif";

     $image_info = @getimagesize($dummy);

     $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";

     $thumb = "<img class=\"pic\" src=\"".$file_src."\" ".(($show_link) ? "" : "onClick=\"alert('".$lang['members_only']."'); \"")."border=\"0\"".$width_height." alt=\"".$image_name."\" />";

   }

    else {

     $file_src = get_file_path($thumb_file_name, "thumb", $cat_id, 0, 1);

     $image_info = @getimagesize($file_src);

with this:
Code: [Select]
   if (!get_file_path($thumb_file_name, "thumb", $cat_id, 0, 0)) {

     $file_src = ICON_PATH."/".get_file_extension($media_file_name).".gif";

     $image_info = @filesize($dummy);

     $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";

     $thumb = "<img class=\"pic\" src=\"".$file_src."\" ".(($show_link) ? "" : "onClick=\"alert('".$lang['members_only']."'); \"")."border=\"0\"".$width_height." alt=\"".$image_name."\" />";

   }

    else {

     $file_src = get_file_path($thumb_file_name, "thumb", $cat_id, 0, 1);

     $image_info = @filesize($file_src);

     $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";

And it seems to have gave a boost back to the gallerys performance..

My question is, Is this Good to do? Any reason I shouldnt use this? or does anyone have a better alternative?

thanks.

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
Re: My gallery NOT slow
« Reply #2 on: July 25, 2006, 03:40:33 PM »
Anyone ?


Offline piyda

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: My gallery NOT slow
« Reply #3 on: January 04, 2008, 10:30:18 PM »
Sadly, it doesn't work for large image files :-(