News Feed
Sections




News Archive
feed this:

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

Erika Heidi Reinaldo:
Optimizing Symfony applications on Vagrant boxes
September 25, 2013 @ 09:34:03

Ericka Heidi has a new post to her site today continuing on her theme of useful Vagrant advice with a look at optimizing Symfony applications on your Vagrant-managed instances.

A few months after I started playing around with Vagrant and Puppet, with smaller applications, I had the task to create a box for a Symfony app for the first time. I thought "all right, no problema! this will be a piece of cake, I already know the process, I just need to put it on puppet". And of course I was wrong.

Most of her problem revolved around performance - the Symfony applications were taking between 6 to 8 seconds to load. After trying several options (hardware and software), she narrowed it down to the overall I/O as the application was trying to access an NFS mounted directory for the "vendors" folder. She changed around the locations of some of the directories and was able to drop the page load times by quite a bit. She's posted the results of her work as a Vagrant file for easy download and use too.

0 comments voice your opinion now!
optimize symfony application vagrant instance vendor io performance

Link: http://www.erikaheidi.com/2013/09/24/optimizing-symfony-applications-vagrant-boxes/

Zumba Engineering Blog:
Some CakePHP optimizations
November 07, 2012 @ 09:31:20

For those out there using the CakePHP framework to create your applications, you might be interested in these quick tips from Juan Basso on the Zumba Engineering Blog for both the architecture and actual code to optimize the performance of the app.

Our site and system has a lot of throughput and it make us use more instances and try to reduce the load in every part. It makes the company happy (save money) and also make the customer happy (faster load). On this article I will go over few things in terms of architecture and some code changes/strategies that could make your application faster as well.

Some of the recommendations include:

  • Installing the APC/opcode caching to help save execution time
  • Avoiding as many network requests as possible
  • Use local file/data caching
  • Using the "requestAction" inside controllers with its built-in caching
0 comments voice your opinion now!
cakephp optimize caching apc opcode file resource


PHPMaster.com:
Speeding Up Your CakePHP Websites
October 09, 2012 @ 10:08:19

PHPMaster.com has a new tutorial posted sharing a few helpful hints about speeding up CakePHP-driven sites to help squeeze the most performance out of your site.

By applying a few simple modifications, and even some more complex enhancements, CakePHP can be sped up quite a bit. By the time you work your way through even half of these changes, the performance of your your CakePHP site will be comparable to many other popular PHP frameworks, with the advantage that your development speed will never falter!

There's several tips in their list - some a bit more difficult to accomplish than others, but worth the results:

  • Upgrade CakePHP Versions
  • Disable Debug Mode
  • Disable Recursive Find Statements
  • Cache Query Results
  • Install Memory Based Caching
  • Removing Apache and Installing Nginx
  • Configure Nginx to use Memcached
  • Remove MySQL and Install Percona

For more information on the CakePHP framework, see the project's main site.

0 comments voice your opinion now!
cakephp website optimize performance tuning tips


PHPMaster.com:
The Need for Speed Profiling with XHProf and XHGui
September 03, 2012 @ 10:29:13

On PHPMaster.com today Matt Turland has an article posted about using XHProf and XHGui to find the performance issues in your application and profile them to help optimize things.

Profiling is the process of measuring the execution time of each function or method call involved in servicing a single page request. The data collected from this process can reveal issues such as a particular method taking a long time to execute or being called a large number of times. Profiling a PHP script generally requires installing a PHP extension. The two more popular extensions for this purpose are Derick Rethans' Xdebug and Facebook's XHProf. This article will focus on XHProf.

He walks you through the installation of both and shows you some sample results of the profiling of a simple application and how you can compare the results across profiling runs. Additionally, if you install graphviz support, you can generate the call stack output in a visual form to make for easier consumption.

0 comments voice your opinion now!
xhprof profile optimize xhgui tutorial install


Anson Cheung's Blog:
Optimize Web Site Performance by using YSlow
October 03, 2011 @ 11:12:08

In a recent post to his blog Anson Cheung guides you through another tool that can help you optimize your web applications - using YSlow for the frontend to detect trouble spots early (whether they're actually caused by the frontend or not).

He goes through the thirteen rules to help improve your website's performance including:

  • Make fewer HTTP requests
  • Gzip components
  • Make JS and CSS external
  • Remove duplicate scripts
  • Configure ETags

For more information about the YSlow extension (available for Firefox, Chrome, Opera and mobile devices), check out the project's page on Yahoo's Developer section (including ten more rules it checks).

0 comments voice your opinion now!
yslow optimize frontend performance extension browser rules


Anthony Ferrara's Blog:
On Optimization in PHP
August 10, 2011 @ 08:35:38

Anthony Ferrara has a new post to his blog today looking at something that's constantly a focus of user-facing applications, PHP ones or otherwise - application optimization. He specifically discusses handling it in PHP and some things to keep an eye out for.

When it comes to optimization, there are two competing viewpoints in the PHP community. Some say that optimization should only ever be an after thought and to avoid premature optimization at all costs. Others will say that this is impractical, and you should make your application fast as you write it, since then you won't have to go back and clean it up to make it faster. While I can understand the viewpoints of both sides, I am firmly in the former category.

He talks about the "90/10 Rule" of development (most of the work is done by only a small part of the code) and what that critical 10% could be made of. He also touches on the "60/40 Rule", "instinctual optimization" and the emphasis people put on benchmarks for their tool or framework of choice.

0 comments voice your opinion now!
optimize application opinion rule benchmark


Justin Carmony's Blog:
Working with Middle-Scale Websites
July 21, 2011 @ 11:53:08

In a new post Justin Carmony looks at what it means to me a "middle-scale website" and has some recommendations for anyone working with their applications and considering things like scalability, overcompensation and finding real results through profiling.

Hopefully at some point, your website is going to get a lot of traffic. Yay, you've reached your goal of getting good traffic, but it is soon followed by issues with performance and load. I like to call these the growing pains of a website. So as a web developer, I suddenly have the epiphany of "Hey, I need to scale my website!" What follows next is the biggest mistake a web developer can make: They start looking at articles on how Google scales, or maybe how Facebook manages all of their traffic. This is a mistake! To be brutally honest, you are not Google. You are not Facebook. You are not Twitter. You are a website that receives less than 0.000001% of the traffic that some of the major websites receive.

He includes a "reality check" of the setup behind a popular social site, StackExchange, with comments from their own post about their infrastructure. He talks about things included in a move to "middle-scale" like adding caching, performance tweaking, moving to a multiple server model and using replication.

0 comments voice your opinion now!
middle scale website application optimize performance profile


Fabien Potencier's Blog:
The PHP Ternary Operator Fast or not?
July 18, 2011 @ 10:35:36

In a new post Fabien Potencier looks at the ternary operator in PHP and wonders which is faster - using it or not (well, sort of...)

People like micro-optimizations. They are easy to understand, easy to apply... and useless. But some time ago, while reviewing pull requests for Twig, I read an interesting discussion about the performance of the ternary operator in PHP (thanks to @nikic for the investigation). Do you know which [example] snippet is the fastest (of course, they do exactly the same)? The right answer is: it depends.

He notes that it's all about the data being worked with. As some of his tests show (testing code included) there does end up being a difference between using it on a small and large dataset. After investigation, it was found that the ternary operator copies (copy-on-write) the value versus an "if" that just evaluates. He also mentions the new "?" version of the ternary syntax in PHP 5.3, but notes it still suffers from the same issue.

0 comments voice your opinion now!
ternary optimize speed dataset copyonwrite


DevShed:
Optimize File Downloading in PHP
July 07, 2011 @ 11:05:50

New on DevShed.com today is a tutorial helping you optimize your file downloading for your web application and provide a way to give users dynamic links to files instead of direct ones.

The true path to the downloadable content can be revealed easily and is not protected, allowing users to bypass web forms and download the content directly using a browser. [...] The Solution: A Secure and Efficient PHP Download Script

This tutorial is actually an update of their previous tutorial looking at a similar subject, with a few differences. Their code provides a way to limit the files a user can download, the number of times they can download it and a script to read the file and push it to the user without them ever knowing the path.

0 comments voice your opinion now!
optimize file download protect tutorial


Matt Knight's Blog:
Optimising Zend_Config
July 06, 2011 @ 10:39:01

Matt Knight has a recent post looking at a specific part of the Zend Framework, the Zend_Config component, and how it's overhead can be reduced (and somewhat replaced) using a few lines of PHP 5.3-specific code.

One such limitation that I've recently seen is the performance of Zend_Config. This class underpins the mechanism by which developers provide configuration to the application, and all this config is passed around in the form of Zend_Config objects. [...] For the purposes of this article, I'm referring specifically to config INI files, using Zend_Config_Ini to parse. This is a very common format for Zend applications to use - it is familiar to developers and infrastructure support teams - and is the case where the performance issues become apparent

He talks about parsing ini files and the complications that can come with the Zend Framework method of parsing them - conversion to objects via a recursive method, merging data from different sections and the overhead toArray can cause. He shows an alternative that uses array_replace_recursive to handle the parsing and a class version that offers backwards compatibility with the Zend_Config structure. He claims to have seen a sixty percent jump in performance using these methods over the Zend Framework's defaults.

1 comment voice your opinion now!
zendframework zendconfig optimize performance arrayreplacerecursive



Community Events





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


community framework list experience install opinion threedevsandamaybe interview release code unittest introduction refactor series configure podcast developer laravel testing language

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