Help - Search - Members - Calendar
Full Version: Fastest Kind Of Site On Zymic Servers
Zymic Webmaster Forums > Zymic Free Web Hosting > Zymic Free Web Hosting - General Discussion & Help
Midknight
What type of web-site would LOAD the fastest on Zymic servers. I have a site that uses PHP & SQL Database, and sometimes it loads up pretty fast and other times it might load slow or run into a error. Would HTML coding be faster and load more often compared to running into error or timeout issues. I know a few months ago I ran into issues with images on the site, I dont use any images if possible and if I do its in a small GIF or JPEG file. But anyway, any suggestions on what loads the fastest, coding wise.
L. Kaiserblazer
html generally loads faster, but it is not always the best method to use... i would try CSS, which can do a lot, but not everything you can do with PHP...
Alex
QUOTE(L. Kaiserblazer @ Aug 13 2008, 06:15 AM) *
html generally loads faster, but it is not always the best method to use... i would try CSS, which can do a lot, but not everything you can do with PHP...


Eh? CSS and PHP are completely different languages, they don't overlap in any significant way...

HTML files will always be served slightly faster than PHP files, but when things are working well there shouldn't be a noticeable difference (it depends on how well optimised your PHP is really). This is simply because PHP has to be passed through mod_php to parse the PHP in the file, this is not required of HTML files. However, the extra functionality in PHP usually more than makes up for a tiny speed hit.
NaRzY
Anything without images would go faster.

Jacob.
Bread
You could always introduce a caching model into your php; so for example lets say you had an article which is normally pulled from a database table, you could cache this into a flatfile and any significant calls to read the article would just pull the flatfile stored version of the page which reduces the need for quering the database, looping through the result set and outputting, which would improve things tenfold; obviously not applicable to every page though.

The MySQL QUERY_CACHE is on, so there's no way on Zymic hosting you could speed up the queries apart from optimising your queries (for example SELECT foo FROM myTable; not SELECT * FROM myTable).
Midknight
Great suggestions, thanks for the tips smile.gif
Adam Kalisz
you can compress generated output (html) = about 5 times faster loading (downloading)
CODE
<?
    define('_GZIP', 1);
    if(is_int(_GZIP) AND stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE){
        ini_set('zlib.output_compression', true);
        ini_set('zlib.output_compression_level', _GZIP);
        ob_start("ob_gzhandler");    
    }
    else {
        ob_start();
    }
    echo 'some sample text ! some sample text !  some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! some sample text ! ';
?>

define('_GZIP', 1); 1 - lowest compression level, 9 - maximum (but can be slow !)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.