Review: PHP Editor/IDE with Memory Profiler

by PHP-Editors staff, June 2014

Our readers are quite familiar with NuSphere's PhpED - their PHP IDE for Windows. We reviewed several versions of their php editor - last time back at the time of version 10.0 release of IDE. Now that NuSphere is about to reveal PhpED version14.0 we jumped on the opportunity to chat with NuSphere VP of Engineering Dmitri Dmitrienko. Naturally we asked him about two biggest features in the new release: PHP Memory Profiler and support for SCCS. Here is what Dmitri told us.

"A while back a friend of mine, who is a web developer called me and asked for help troubleshooting his server. The problem was that server has been crawling ever since my friend installed his latest Yii based PHP application there. His development server running the same application was doing just fine. We spent hours profiling his code using NuSphere's PHP Profiler but the problem turned out to be in something profiler couldn't touch then - applications memory consumption.

Imagine that you tuned your application to a max - NuSphere tools can help you do it, SQL Profiler will deal with Data Base bottlenecks, Line Profiler will help you find inefficient code, but it doesn't mean that you are home free. With multiple memory hungry applications on the server disc cache may run out fast forcing the server to swapping and in the worst case scenario to even timeout and dropping the request with 500 statuses flying back to the users. The math is rather simple: Production server handles 100 requests per second easily, which means it gets a new request every 10ms. With all pages generated in 0.12s the server will see 20 processes running simultaneously - which is a low end of a very conservative estimate actually. With 20-30 processes running in parallel and each taking 60M of memory we already need 1.2-1.8GBytes of RAM. Setting PHP memory limit to 64M is pretty much a standard these days, and most of the people have seen memory_limit set to 128MB or even 256MB. PHP is of course not the only memory consumer - other likely contenders include the data base, disc cashing and many others. If the server has 4G of RAM total the SWAP zone is not that far at all and you need the tools to find out what's going on with your memory in php code. Given that php applications with 200K lines are not rare you need something better than calls to memory_get_usage() - and we worked hard to get Php Memory Profile in PhpED 14.0. Our users will see that memory profile is seamless addition to well known PHP Profiler functionality with the familiar user friendly interface. Once the debugger is setup on your server all you need to do is hit Run Profiler button and the output will present the table and the chart, all sortable by memory consumption in each line of the code, both core PHP and user functions and classes.

PHP Editors Memory Profiling

Interestingly, when we profiled Yii demo application - simple blog we discovered that Yii's HTML Purifier takes 6MB of memory to generate a simple 24K large web page!!!"

The case for Memory profiler is indeed very Convincing. Now, why tackle SCCS? Dmitri explained:
"If you a web developer most likely you are not limited to PHP (or any other back end language), most certainly you are coding JavaScript, HTML and of course CSS. All of these languages are fully supported in PhpED's editor with code intelisense, code navigator and debugger. CSS deserves a special attention. Everybody who worked with Style Sheets knows how tedious is the process of figuring out the layout, duplication of all properties just to introduce a slight change in one of them etc. There are different approaches of handling it including dynamic CSS generation in PHP - but these are very inconvenient and hard to support. The real answer comes with SASS - new standard that allows for the use of formulas to dynamically compute CSS properties, nested rules and better structures. This all good and great but the problem , as it always is the legacy code. Typically there are 100s of CSS written and used on larger websites and abandoning them is rarely an option. And this is when SCSS comes to the rescue. While a newer branch of SASS SCSS is also fully compatible with existing CSS syntax, which lets the developer to take advantage of the benefits of both SACC and keeping legacy CSS. Al you need to do is to change .css extension to .scss and off you go. Given the power in SCCS we believe it will be growing fast and our users need the tools for productive coding of SCCS. PhpED 14.0 brings in such tool in the form of full support for SCCS in PHP Editor, code navigator and code intelisense overall. You get the benefit of code folding and code complete, everything you are probably used to in PhpED other file formats."

PHP editors SCCS support

Finally, Dmitri noted that both of these and all other features are available in PhpED Pro and Personal editions

We express our gratitude to Dmitri and entire NuSphere engineering team and given the occasion we would like to pass these links to our readers:
PhpED Main page: http://www.nusphere.com/products/phped.htm
PhpED Free trial download: http://www.nusphere.com/download.php.ide.htm
PhpED version comparison: http://www.nusphere.com/products/phped_verscomp.htm
And NuSphere main page: http://www.nusphere.com




© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.