Make site faster!

Started on the old forum in July 2010 · view the original in the archive · old links redirect here

13 replies · 1,497 views · started 16 years ago · 1 min read

8 participants
sanju Developer · 59 posts #1

Is there any way to maintain my site speed. Plz post here, hw can i make my site faster to browse?

GumSlone Administrator Principal · 1,690 posts #2

sanju wrote: Is there any way to maintain my site speed. Plz post here, hw can i make my site faster to browse?

remove ads 🙂 use gzip compression use external css files

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

subzero Super moderator Fellow · 3,954 posts #3

No sql, No exec files

No other users

Buy a Virtual private server or go big Dedicated Servers

Never think share hosting will always fast .......

Also fix errors

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

subzero Super moderator Fellow · 3,954 posts #6

it working both of yours but i liked riderz moving the site abit abit faster lol

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

khan Lead · 681 posts #7

riderz wrote: Caching database-driven PHP pages is an excellent idea to improve the load and performance of your script. It’s really not all that difficult to create and retrieve static files of content with the help of our good friend ob_start().

// TOP of your script  
$cachefile = 'cache/'.basename($_SERVER['SCRIPT_URI']);  
$cachetime = 120 * 60; // 2 hours  
// Serve from the cache if it is younger than $cachetime  
if (file_exists($cachefile) && (time() - $cachetime < filemtime($cachefile))) {  
include($cachefile);  
echo "<!-- Cached ".date('jS F Y H:i', filemtime($cachefile))." -->";  
exit;  
}  
ob_start(); // start the output buffer  
// Your normal PHP script and HTML content here  
// BOTTOM of your script  
$fp = fopen($cachefile, 'w'); // open the cache file for writing  
fwrite($fp, ob_get_contents()); // save the contents of output buffer to the file  
fclose($fp); // close the file  
ob_end_flush(); // Send the output to the browser  

yeah......I used It for one of my client pages. It Works faster And its not needed any xtra handler from server side. But I surprised to see that its not work faster for php-wml.:O

crazybrumi Super moderator Principal · 1,064 posts #8

basic is only use php when needed as this is the most server consuming proccess. only connect to the server when needed ie if your going to look up a query bladi blah otherwise just stik to plain html as the browser will do all the work then not the server.

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

subzero Super moderator Fellow · 3,954 posts #9

sanju wrote: Is there any way to maintain my site speed. Plz post here, hw can i make my site faster to browse?

Send me your data base users tables and i will make you a cool script for you to use so your site will run 10% faster and cleaner that is a hope it does but lets try it ..

Names not the sql ok

like

ibf_users ibf_posts

type all down for me then i will do this simple code for you to use with corn

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

wap2k Developer · 168 posts #10
  1. One good thing your could do would be to use PHP Data Objects (PDO) to interface with MySQL; The php mysql_ functions over 6+ years out of date. PDO is Cross Database meaning you could use different related databases: Cubrid, Microosoft SQL, Firebird, Interbase, IBM, Informix, MySQL, Oracle, ODCB, 4D, SQL-Lite, PostgreSQL using the built in drivers. It also Provides Extra SQL Injection Prevention. Caches frequently used queries that can be re-used without being recompiled by the processor.

  2. Limiting the number of Queries that your script needs to do could be another way to speed up page execution time. If there are sections of your script that use multiple MySQL Selects to the same table why not select if all at once.

  3. You might also consider caching information that does not change very often. For example User Settings and Profile Information should only need refreshing if the users updates them. You should only need to select this once then update and refres on a new login or profile update.

  4. Move your site to a Dedicated Server this way you have your own dedicated space. The more popular your site gets the more it will slow down; This is because more server resources are being used up by other users on the same server your are being hosted on. When you go dedicated there are no other users. This gives you Dedicated RAM, Bandwidth, Space and you can use the resources that you require. There are a lot more advantages to dedicated hosting but that is another discussion.

  5. Moving your site to a Virtual Private Server (VPS) this is usually a partion of a dedicated server. You can do pretty much what you can do with a dedicated server but prices can be a lot cheaper.

  6. Use of bitwise to store on and off settings (32 settings for each and every digit), Remove un-needed stuff from the database tables. Only use PHP if it is needed. Output Buffering (Can also be stacked), Caching systems, Gzip Compression, Load Balancing, Optimization of Site Graphics, CSS and HTML Markup Validation and optimisation/compression.

frostymarvelous Senior · 266 posts #11

Pdo is not a database. Its a layer to interact with the database.

Perfection comes at a cost

I accept liberty!

wap2k Developer · 168 posts #12

Thanks... I already knew that 🙂. That was written when i was tired i have corrected a couple of mistakes.

frostymarvelous Senior · 266 posts #13

😀. All in all, you have some valid points there.

Usind prepared statements with pdo will speed up your script and also help prevent injection attacks, only if you use them well. Also help with multiple queries.

Gzip compression is also great for speeding up delivery to the browser, but can use resources.

Splitting your tables can help a great deal like, separating users from their settings and profiles.

There's just soooo much, you will learn as you go along, just be willing to learn.

Perfection comes at a cost

I accept liberty!

morency Senior · 488 posts #14

riderz wrote: Caching database-driven PHP pages is an excellent idea to improve the load and performance of your script. It’s really not all that difficult to create and retrieve static files of content with the help of our good friend ob_start().

// TOP of your script  
$cachefile = 'cache/'.basename($_SERVER['SCRIPT_URI']);  
$cachetime = 120 * 60; // 2 hours  
// Serve from the cache if it is younger than $cachetime  
if (file_exists($cachefile) && (time() - $cachetime < filemtime($cachefile))) {  
include($cachefile);  
echo "<!-- Cached ".date('jS F Y H:i', filemtime($cachefile))." -->";  
exit;  
}  
ob_start(); // start the output buffer  
// Your normal PHP script and HTML content here  
// BOTTOM of your script  
$fp = fopen($cachefile, 'w'); // open the cache file for writing  
fwrite($fp, ob_get_contents()); // save the contents of output buffer to the file  
fclose($fp); // close the file  
ob_end_flush(); // Send the output to the browser  

Just now I read this ! Very nice .. but not good ideea for sites who serve ads between content .. :-S

Unamos los corazones,hoy todos somos multicolores!

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close