Speedup your website!
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    BigGun
    Posts: 150 from 2004/6/18
    From: Nagold - Germany
    The new AWEB version brings support for compressed webpages to the Amiga/MOS community.

    This can speedup surfing A LOT. :-)

    Sites which send compressed content (Amazon/heise/amigaworld/thousands more...)
    load much faster now.
    The speed depends on the compressibility of the content. Many sites experience a speed up of 200 - 300 %.

    It would be great if you enabled gzip support
    on your websites (Morphzone) too?


    This can very easely be done:

    a) by adding this line to your php page.
    ob_start("ob_gzhandler");

    This needs to be in your php page before you put out anything. A perfect place will be in a config-file which all your pages include.



    b) Those which run their very own server can enable compression support globaly with the below setting in php.ini .

    zlib.output_compression = On


    If you need help, please get back to me. I'll happily assist you.

    Cheers

    Gunnar
    gunnar@greyhound-data.com
  • »22.07.05 - 11:27
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Robin
    Posts: 741 from 2003/2/24
    Too bad that I dont use php on my server ;-)
  • »22.07.05 - 12:31
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    BigGun
    Posts: 150 from 2004/6/18
    From: Nagold - Germany
    Hi Robin,

    Sorry I only gave an example for PHP but you can enable compression for mostly any kind of webpages.
    For static HTML pages and for output generated by perl, java, ruby, you name it.

    Please tell us how your website is setup and I'll try to give advice for enabling compression for it.


    BTW:
    In general enabling output compression will not only make the pages much faster for your visitors - it will often make your server be able to handle a much higher load too.

    Busy websites often run into huge problems handling the number of simultanious users. Each user which downloads a page keeps a webserver instance busy. So for the time of the download a webserver instance consuming a couple of megabytes working ojn the request.
    By enabling the output compression the user will download the pages much faster. A HTML page usually compressed to 20% of its size. So the webserver instances will be freed up after 20% of the normal time and the server will be able to handle much more simultanious users.


    Cheers
    Gunnar
  • »22.07.05 - 13:01
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Robin
    Posts: 741 from 2003/2/24
    Thanks Gunnar, I'm pretty sure there is a mod
    for apache to switch this on ... I just dont have
    the time atm ... Btw my server is perl only since it's
    too easy to program unsafe php ;-)

    The reason for me not having time is that someone
    has set the dns of a website (web-netz.de) to my ip ...
    so everyone who uses this website and it's tools
    (banners,counters,etc) now runs into my server ...
    I try to find a solution for this before I can
    reorganize my server :-)
  • »22.07.05 - 13:33
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    BigGun
    Posts: 150 from 2004/6/18
    From: Nagold - Germany
    Yes Robin,

    you can enable the compression on Apache level.
    Load mod_gzip for Apache 1.x3.x or mod_deflate for Apache 2.0.x


    Cheers
    Gunnar
  • »22.07.05 - 13:49
    Profile Visit Website
  • Targhan
    Posts: 2833 from 2003/2/8
    From: USA
    I have gzip compression on MZ, it's just turned off because some amiga/mos browser or another blew chunks when I sent compressed data out...
    :idea:Targhan

    MorphOS portal? www.MorphZone.org
  • »22.07.05 - 16:25
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    BigGun
    Posts: 150 from 2004/6/18
    From: Nagold - Germany
    Hi Targhan,

    the idea of the compression is that the Web browser has to ask the server to send the pages compressed. The server will never send compressed data to web browser which do not ask for it.

    Voyager and Ibrowse do not ask for it and will always get uncompressed pages.

    I have never heard of any problems with the Amiga browsers.
    And their surely can't be any as amigaworld and ann.lu
    use compression too. :-)

    Please tell me if you can spot a problem.


    Cheers
    Gunnar
  • »22.07.05 - 19:00
    Profile Visit Website
  • Targhan
    Posts: 2833 from 2003/2/8
    From: USA
    BigGun,

    Okay, I turned the compression back on. I think I had some beta of aweb that asked for the gzip but then couldn't handle it or so in the past. (or was it V_beta?) Anyway, test away!


    If anyone has problems please contact me at my morphos-user.com email address!
    :idea:Targhan

    MorphOS portal? www.MorphZone.org
  • »22.07.05 - 20:11
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    BigGun
    Posts: 150 from 2004/6/18
    From: Nagold - Germany
    Hi Traghan,

    At the moment Morphzone.org does NOT support sending compressed webpages. Are you sure that you have turned it on?


    Cheers
    Gunnar
  • »23.07.05 - 08:14
    Profile Visit Website
  • Targhan
    Posts: 2833 from 2003/2/8
    From: USA
    Well, I turned it on from the admin interface, but there are some other issues going on right now with MZ--so that could be playing into this as well. Since I'll be doing an upgrade this weekend, it might be straightened out then ;-)
    :idea:Targhan

    MorphOS portal? www.MorphZone.org
  • »23.07.05 - 16:53
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Wishmaster
    Posts: 342 from 2003/6/29
    AWeb says cannot open Gadgets/Button.gadget.
    What is problem ?
    Pegasos PPC
  • »26.07.05 - 23:48
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    BigGun
    Posts: 150 from 2004/6/18
    From: Nagold - Germany
    Wishmaster

    Where did you download the binary?
    When did you download it?
    What compile date does the about requester say.
    Why do you write here instead of emailing me? :-)

    Cheers

    Gunnar
    gunnar@greyhound-data.com
  • »27.07.05 - 08:31
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    BigGun
    Posts: 150 from 2004/6/18
    From: Nagold - Germany
    @ Traghan,

    Please read the below as a friendly offer and please don't take it as an insult. Because its not meant as an insult but as a friendly offer. :-)

    I noticed that:
    - the compression does not work yet
    - and frankly, that the page creating times are shockingly slow.

    Maybe I can help you enabling this on the site?
    Do you have the possibiliy to install software on this host?
    If yes then I would recommand that you consider installing
    a PHP opcode cache to speed up the site.


    Cheers
    Gunnar
  • »27.07.05 - 08:45
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Wishmaster
    Posts: 342 from 2003/6/29
    Sorry, BigGun.
    I have downloaded it from MOS-News again.
    This version is running.
    Pegasos PPC
  • »27.07.05 - 23:23
    Profile
  • Targhan
    Posts: 2833 from 2003/2/8
    From: USA
    @biggun

    is the compression not on now? Recheck the speed too ;-) You want me to turn on page caching from the server side? I can certainly try ;-)
    :idea:Targhan

    MorphOS portal? www.MorphZone.org
  • »28.07.05 - 17:05
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    BigGun
    Posts: 150 from 2004/6/18
    From: Nagold - Germany
    Hi Targhan,

    nope compression is not working yet.

    There are a few things which you could look at if you want to speed up the site.

    a) Turn on compression for your pages.
    A forum page (like the one of this thread)
    is 65KB of size and will compress down to 11KB.
    Enabling compression will speed-up its download by 6 times.

    b) Let the webserver send expires header for your images.
    You have around 130 KB of images on each page.
    The webserver can send expires header to allow your visitors
    to cache all the images which don't change often (like your banner). If you allow your visiting users to cache the images
    then their browsers will not need to verify all these images with every click on your site. This will bring a big speedup.

    c) Your page creating time of around 1 second is a bit slow.
    I would expect something in the range of 0.01 seconds.
    Aka 100 times faster. The creating time is based on three
    things 1st parsing the php, 2nd executing the php 3rd the SQL queries. I simple way to cut down the parsing time to zero is
    by installing php obcode cache.
    Example: http://www.php-accelerator.co.uk/

    Reducing the php executing time is more difficult
    and will require looking at your code.
    If you believe that the database is a bottle neck than I can offer you to lock at your settings. BTW what version of mysql are you running?


    Cheers
    Gunnar
  • »28.07.05 - 17:31
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Robin
    Posts: 741 from 2003/2/24
    @BigGun

    wow ... I recompiled apache with deflate-support and it's
    really amazing :-) Now I just need a V that supports compression ;-)

    Thanks for the tip :-D
  • »28.07.05 - 20:48
    Profile Visit Website
  • Targhan
    Posts: 2833 from 2003/2/8
    From: USA
    @biggun

    I may have to chat with you in private later. ATM, I'm a little covered up--but I would love to speed things up as much as possible with the given overhead that MZ has to work under...
    :idea:Targhan

    MorphOS portal? www.MorphZone.org
  • »28.07.05 - 23:39
    Profile Visit Website