Sometimes you have large amount of generated data that you don’t want to create on every web request. An examples would be a home page with several news posts on it. The text would be in a database, but all the ‘extra’ things you did like bbtags present in the text, information about the user that posted it, etc etc [...]
Here we are, part 4b. By using XDebug, a pecl extension, our php code can be analyzed pinpointing the slower functions. Installing XDebug is easy: pecl install xdebug Now, you’ll have to enable it in the php.ini file: extension=xdebug.so xdebug.profiler_enable=1 xdebug.profiler_output_name=profiler-%s-%t.cache xdebug.profiler_output_dir=/tmp/xdebug Don’t forget to create the directory and give apache enough permissions to write in it. So after restarting [...]
Let me start by saying, I won’t bore you with the list of what I call stupid optimizations. That’s why I call this 4a, I recommend skipping 4a and go directly to 4b When I first when on my quest to optimize my code, I was disappointed at what I found. Let me give you a short list of ‘tips’ [...]
In one of my previous blog posts I talked about using APC as an opcode cacher to speed up your site. I thought it was worth mentioning a second time. This greatly improves the performance. You can read more about the different opcode cachers and how to configure them here: http://blog.crazytje.be/php-opcode-caching-why-use-an-opcode-cacher/ Part 4 will talk about optimizing your php code [...]
Once your site begins to grow, it will most likely contain dozens of images, css and js files, and many other requests. Keep alives allows those requests to happen over the same tcp/ip connection. So what is keep alive exactly? As mentioned before, keep alive is an option in the apache config, this was added to the http protocol to [...]