Author Topic: Video Gallery loads sllllooooow  (Read 11151 times)

0 Members and 1 Guest are viewing this topic.

Offline Kane

  • Newbie
  • *
  • Posts: 23
    • View Profile
Video Gallery loads sllllooooow
« on: October 21, 2005, 01:26:33 AM »
I use my gallery exclusively for videos and it is loading so slow that it's almost unusable. I dont mean the videos are slow, but the actual homepage and the category view. Every other page of my site loads fast except those associated with 4images, so it's not the server.

I use a custom template without the random images thing, so it's not that.

It seems to load slower as I add more video types, when I remove them it loads faster again. Is there a reason for this???

Offline Kane

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Gallery loads sllllooooow
« Reply #1 on: October 21, 2005, 01:53:39 AM »
As a test I modified the valid file extensions to only include images and now it's running fast again! But the videos don't work, of course.

Offline Acidgod

  • Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Video Gallery loads sllllooooow
« Reply #2 on: October 21, 2005, 02:46:03 AM »
you can activate the caching... (o:

Offline Kane

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Video Gallery loads sllllooooow
« Reply #3 on: October 21, 2005, 03:01:08 AM »
How do I activate caching? I don't see an option for it in the amdin panel.

Also that doesn't explain why this problem would occur in the first place. Does anyone know why?

Offline Kane

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Video Gallery loads sllllooooow
« Reply #4 on: October 21, 2005, 03:12:27 AM »
I figured out how to activate the cache but it's still slow as crap. I think that this is a glitch/flaw in 4images itself and I'd like to hear from one of the developers what is going on.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Video Gallery loads sllllooooow
« Reply #5 on: October 21, 2005, 03:54:11 AM »
its because 4images is using getimagesize() PHP function, which "reads" file content in order to determing what type is it. Video files are usualy big and server might have not enough resources to read entire file fast enough. 4images was not build for video files, even though it supports them ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Kane

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Video Gallery loads sllllooooow
« Reply #6 on: October 21, 2005, 04:17:26 AM »
Ok, thanks for the reply. That is what I was looking for, an explanation for why it's happening.

It looks like the cache method makes it a lot faster, though it's still not as smooth as I'd like for it to be. I'm going to try and hack the files myself to see if I can manage a work-around or maybe switch to another script...


edit: Anyone know how I can hack the script to remove getimagesize() and hard code it in to automatically know that every file is a wmv extension?

Offline soapycats

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Video Gallery loads sllllooooow
« Reply #7 on: October 21, 2005, 07:16:58 PM »
just found this post
http://www.4homepages.de/forum/index.php?topic=7713.0

that says,
"I fix this bug.
Replace getimagesize in function.php
with filesize."


I've tried it (made backup first!) but not tested speed difference yet

the directory is:
includes / functions.php

post your results if it works out and/or if you find solution to speeding it up.

best wishes,
michelle

Offline Kane

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Video Gallery loads sllllooooow
« Reply #8 on: October 22, 2005, 03:30:42 AM »
Thanks a bunch man! It's nice to know that some people here are willing to help.

I'm not a programmer myself, I spent three hours last night searching google and tinkering with the includes/functions file before discovering this code "get_file_extension". I replaced "getimagesize" with "get_file_extension" and now everything loads super fast like it's supposed to. The only negative is that I had to edit my template because the file size in the descriptions of the image no longer listed its correct size. 

Offline scubaguy

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: Video Gallery loads sllllooooow
« Reply #9 on: October 22, 2005, 03:47:57 AM »
On a video site I'm using the "filesize" fix and the site went from a complete server crash every 5 minutes with 100+ simultaneous users to lightning fast.  Thanks so much for the fix!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Video Gallery loads sllllooooow
« Reply #10 on: October 22, 2005, 04:37:29 AM »
all this might work for non-images well, atleast no image dimmentions will be showed either.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline yellows

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Video Gallery loads sllllooooow
« Reply #11 on: October 28, 2005, 11:53:54 AM »
done the filesize fix for videos but is there a fix out there to speed the images up

cheers

james

Offline Mirwais

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Video Gallery loads sllllooooow
« Reply #12 on: March 14, 2006, 07:04:53 PM »
YEsss
It helped me!!
http://www.4homepages.de/forum/index.php?topic=7713.0
Loads very fast now


Tnx alot