News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Gonzalo Ayuso's Blog:
Speed up page page load combining javascript files with PHP
February 21, 2011 @ 13:01:54

Gonzalo Ayuso has a handy performance tip for getting that little bit extra speed from your page load times - combining Javascript with PHP files.

One of the golden rules when we want a high performance web site is minimize the HTTP requests. Normally we have several JavaScript files within our projects. It's a very good practice to combine all our JavaScript files into an only one file. [...] But if your project is alive and you are changing it, it's helpful to spare your JavaScript files between several files. [...] So we need to choose between high performance and development comfort.

He includes a quick script that runs through your javascript directory (recursively), grabs all of the javascript content from each, combines and minifies them to serve gzip compressed out to the browser.

0 comments voice your opinion now!
javascript tutorial combine minify gzip page load performance


Wojciech Sznapka's Blog:
Power of PHP streams - decompress gz archives on the fly from remote server
November 24, 2010 @ 08:39:05

Wojciech Sznapka has a new post to his blog today looking at the "power of PHP streams" and how they can be used to decompress gzipped data from remote servers.

Probably most of us heard about streams in PHP. They are background of all files and network operations in PHP, even if we don't see it. Everytime when you use file_get_contents or fopen you are actually using streams. But there are many stream wrappers I haven't used, because they aren't well known.One of them is compress.zlib (and two other compression stream filters).

He includes a quick example (because, thankfully, that's all working with streams like this usually requires) about pulling in a file from his server and uses the stream to fetch and unzip the data to display the contents.

0 comments voice your opinion now!
streams tutorial gzip decompress archive


Stuart Herbert's Blog:
More about Performance Tuning
February 05, 2008 @ 07:57:00

Based off of a previous article from Mike Willbanks, Stuart Herbert has posted some of his own thoughts on tuning and tweaking your applications for the best performance you can get out of them.

There's some good advice in there, and I thought it'd be a good idea to quickly add a bit more detail about the separate approaches that Mike raises.

He goes over the APC caching, memcache, the "gzip trick", the "Not Modified" header and optimized SQL statements.

He also mentions one thing that Mike didn't mention - a split between static files (no PHP needed) and their dynamic cousins. Having a more pure Apache (no PHP installed) can help give a minute jump in speed that, depending on the size of the site, could really add up from a user's perspective.

0 comments voice your opinion now!
performance tune memcache apc sql optimize gzip notmodified


Leon Chevalier's Blog:
Improve website load time by 500% with 3 lines of code
January 23, 2008 @ 12:09:00

Leon Chevalier has posted about a class he's developed (you can download it here) that can help to speed up the load times for your site.

There are 4 relatively easy ways by which you can speed up the time it takes a browser to download a page. Following on from my post on joining CSS and JavaScript files, I have written a PHP script which will automatically do all of the above.

He gives example code of the class in action and includes some screenshots of the benchmarks from the YSlow Firefox extension showing the improvements.

0 comments voice your opinion now!
website load time compress gzip class download


JBLabs Blog:
How to create a zip archive using PHP
July 03, 2007 @ 11:08:00

On the JSLabs blog today, there's a (short) new tutorial showing an alternate method to creating a Zip archive in PHP (rather than with the zip extension).

He illustrates the creation of simple archive that pulls in a test file from a given path. This is then pushed into the zip archive and packed down and exported. He also notes the different compression levels that it can be created with - no compression, bzipped and gzipped.

You can download the library here.

0 comments voice your opinion now!
zip compress archive library bzip gzip zip compress archive library bzip gzip


JSLabs Blog:
5 tips for creating high performance web apps
February 08, 2007 @ 12:32:51

In this new post, Justin Silverton shares a few helpful hints for creating high performance applications in PHP:

  • use multi resultset queries to your database rather than many small ones
  • page/object caching
  • gzip compression
  • tune your web server
  • Don't save performance testing for the end of the project
Each of the items has explanation and links to more details on them (including links to three difference object caching applications - ion cube, alternative PHP cache, turck MMCache).

0 comments voice your opinion now!
create high performance web application cache gzip webserver testing create high performance web application cache gzip webserver testing


Ilia Alshanetsky's Blog:
5.2.1 RC3 Released for testing
January 19, 2007 @ 07:16:46

Ilia Alshanetsky has posted the announcement about the release of the latest Release Candidate for the upcoming PHP 5.2.x series - PHP 5.2.1 RC3.

Since the last release, there are over 20 different bug fixes resolving some annoying engine issues such as the tempval leak inside foreach(). We do not anticipate any regressions to be introduced by this RC, but I would still like to ask everyone to take a few minutes and test it against their code base. If you come across any issues please report them at http://bugs.php.net/.

You can download these latest files here:

Depending on how stable things run with this release, it might be the last Release Candidate for the series. A final release might be coming soon - so get out there and run those tests!

0 comments voice your opinion now!
release dandidate php521 testing download gzip bzip release dandidate php521 testing download gzip bzip


ThinkingPHP:
Issues with output buffering in CakePHP
July 17, 2006 @ 06:13:16

If you're using the CakePHP framework and are having a problem with output buffering, this quick tip on the ThinkingPHP blog might work for you.

Output buffering is a useful way to accomblish things in php like gzipping all html output and such. A while ago I wrote about it on this blog (see "A miracle called gzip") as well.

The reason I write about it again is, that I have discovered a little issue with it in CakePHP.

He notes that if you just use the ob_start with the gzip handler, debug issues arise. The soultion he's come up with, though, isn't quite as simple, but gets the job done in about ten lines and is easy to drop in anywhere.

2 comments voice your opinion now!
cakephp framework output buffering gzip debug cakephp framework output buffering gzip debug


DevShed:
An Object-based Approach to HTTP Compression in PHP
April 17, 2006 @ 13:06:46

DevShed has posted part two of their series on speeding up your page load times with HTTP compression, this time looking at a more object-oriented approach to handling the data you want to compress.

Over the first tutorial of this series, I developed some hands-on examples, aimed at illustrating how "Gzip" encoding can be used within PHP scripts to compress the output generated by dynamic PHP pages. After transferring the encoded data to the client, contents are uncompressed and finally displayed on the browser.

By the end of this article, you should have the appropriate knowledge for building a simple data compressor class, in addition to using HTTP compression for reducing the download time of object-generated web pages.

They start with the creation of a simple data compression class, with functions to see if the browser supports gzip encoding and to get/send/compress the actual data. With the sample class created, they put it to the test with a more real-world example - echoing out user information from a MySQL database.

0 comments voice your opinion now!
gzip compression buffer output object-oriented gzip compression buffer output object-oriented


PHPit.net:
Having fun with PHP's output buffer
April 17, 2006 @ 07:13:24

One of the more powerful and handy features that PHP offers is output buffering. It allows you more control over when the client's browser gets the information instead of just spewing information at random. It is a little tricky to get the hang of, so PHPit.net has put together this new tutorial on how to get started.

I'm sure most of us have come across the dreaded "Cannot modify header information - headers already sent", and this is usually caused when your script tries to send a header or set a cookie, when it's already sent output. The easiest fix is to make sure no output has been sent, but it's also possible to enable something called output buffering which also solves the problem.

In this article I'll first show you how output buffering works, and take you through most of its basic functions. After that we'll have a look at what's possible with output buffering, and show you some neat tricks.

The groundwork is laid first, giving a simple "Hello world" example to show how the code flows. They show how the buffering system works and how to use a callback function to modify the contents of the buffer before outputting (including a full replace function to text within the buffer from an array). They follow that with a look at creating your own HTML tags and using the gzip compression functionality to speed up your pages.

0 comments voice your opinion now!
output buffering example tutorial simple callback replace gzip output buffering example tutorial simple callback replace gzip



Community Events











Don't see your event here?
Let us know!


introduction code example install security podcast language component facebook application unittest release framework hhvm hack opinion symfony2 package overview composer

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework