Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h2>Efficient Transport</h2> <p>Your code does not refresh every 10 seconds, but every second(1000 milliseconds is equal to 1 second). Polling that fast is bad. You should as an efficient transport which does "wait" for the new information. The most simple transport that works in every browser is long-polling, but does not scale that good in PHP/Apache. Luckily you can use the free <a href="http://pusher.com" rel="nofollow">pusher</a> plan which uses efficient transport called Websockets(which is the future for real-time communication). When you get big you should like into <a href="http://socket.io" rel="nofollow">http://socket.io</a> for example.</p> <h2>In-memory database</h2> <p>I also advice you to look into in-memory databases like <a href="http://redis.io" rel="nofollow">Redis</a> or <a href="http://memcached.org" rel="nofollow">Memcached</a>(popular among twitter/facebook) to store your queries completely in memory instead of fetching from disc via SQL(which is slow compared to memory). I really like Redis because it is very fast and more feature complete compared to Memcached. You are even that lucky that <a href="http://redistogo.com" rel="nofollow">redistogo</a> does provide free plan to use Redis. This way you don't need to compile redis, which is very easy(I think easier than compiling memcached).</p> <h2>ByteCode Cache</h2> <p>When you can you install <a href="http://php.net/manual/en/book.apc.php" rel="nofollow">APC</a> you should really because this will make your site a lot faster without even writting a single line of code. <a href="http://en.wikipedia.org/wiki/PHP_accelerator" rel="nofollow">"This bytecode cache caches the compiled bytecode of PHP scripts to avoid the overhead of parsing and compiling source code on each request (some or all of which may never even be executed)".</a></p> <h2>SQL-injections.</h2> <p>I would advice you to look into <a href="http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/" rel="nofollow">PDO's prepared statements</a> to prevent SQL-injections the right way. Furthermore PDO is very nice to test your code because you can use in-memory mode using SQLite.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload