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

GotoTech.com:
Developer Diary: Taming Doctrine’s 2000 Flushes
May 02, 2012 @ 15:19:35

In this new post to the GotoTech.com blog Eric Burns talks about a way he's "tamed Doctrine's 2000 flushes" with a wrapper around the EntityManager to make controlling the database flushes simpler.

For my project I decided to use the Doctrine 2 ORM to manage my data layer. We also use this at work, so the biggest reason I chose this was to be able to learn more about Doctrine to help me in my job. But this decision also makes sense for my project because my entity relationships will likely be fairly straightforward for the most part and using an ORM will allow me to make a lot of progress very quickly without (I hope) causing me lots of trouble later on.

His handy wrapper (Data Manager) makes it simpler to perform the flush and still take transactions into consideration. His simple class includes "flush", "commit" and "startTransaction" methods that don't actually perform the flush until the commit is called.

tagged: doctrine flush database wrapper transaction

Link:

SitePoint PHP Blog:
Speed Up Your Website with PHP Buffer Flushing
Oct 29, 2010 @ 13:34:18

New from the SitePoint blog, there's an article from Craig Buckler about using buffer flushing to increase the load times of your applications and websites.

Output buffering makes this process quicker and more efficient. The buffer is essentially a big memory-resident string. When text is output, it's appended to the buffer rather than returned to the browser immediately. The buffer is then "flushed", i.e. its contents are transmitted and the string is reset pending further output.

He notes the instances where the buffer would be flushed - end of page, exceeds number of bytes allowed or a manual flush is called - and code snippet example of a simple flushing setup. He also asks for some feedback on this method, so be sure to look at the comments for more thoughts from the community.

tagged: buffer flush output speed optimize

Link:

Michael Caplan's Blog:
Don't Forget to Flush
Jan 08, 2009 @ 18:09:15

In this recent post to his blog Michael Caplan looks at a feature of PHP that's sometimes forgotten when pushing out larger chunks of data - flushing.

As a recluse who prefers hiding behind servers rather than dancing around your web browser’s canvas, I was intrigued with their server side recommendations - however sparse they may be. In particular, flushing generated head content early to speed up overall page delivery and rending time was a technique new to me.

Michael looks at what "flushing generated head content" means and includes a scenario - pulling the top palettes from the COLOURlovers site - and some performance stats on page load time and response time directly from the server (complete with graphs).

tagged: flush chunk compress head content load time statistics response

Link:

Harun Yayli's Blog:
memcache.php flushes servers
Aug 29, 2008 @ 18:45:29

Harun Yayli mentions some updates to his memcache.php project (providing statistics on the optimization your site is gaining from using the memcached extension).

Your good comments from all over the world about memcache.php is amazing. Thank you all! I've recently received a contribution from Michael Gauthier. I took the liberty to tweak a bit and now memcache.php can flush individual server (no flush all servers yet).

The latest version of the file can be downloaded here and some sample output can be seen here.

tagged: memcachephp memcache project statistics flush server

Link:


Trending Topics: