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

Blackfire.io Blog:
"Getting Started" Webinars Announced
Oct 24, 2018 @ 16:18:34

Blackfire.io, the PHP performance profiling service, has announced a series of webinars aimed to help you learn more about the service and how it can help you get the most out of your code. These webinars are spread out all across the globe so anyone can attend at a timezone-appropriate hour.

Here's the list for the October and November sessions:

You can find out more about the contents of each sessions - "Getting Started with Blackfire", "Introduction to Blackfire" and "Automating Performance Testing with Blackfire" - by clicking on the link for the related event. If you're interested at all in improving the performance of your application, check one of these webinars out. Blackfire offers their "Hack" level of support to try out for free too so there's no reason not to give it a shot!

tagged: blackfire profile performance service webinar announcement

Link: https://blog.blackfire.io/events/category/webinar

Sameer Borate:
How to profile and debug MySQL queries for speed
Apr 02, 2018 @ 15:40:59

On his Code Diesel site Sameer Borate has a quick post sharing a helpful tool that can make profiling the SQL queries your application makes simpler. In this post he shows how to use the Neor Profile SQL profiler desktop application (compatible with Windows, OSX and Linux) to hook into your SQL flow and evaluate the queries in real time.

Most MySQL applications need profiling for speed enhancements at one time or other. I’ve developed several web applications in the past wherein MySQL queries were a major bottleneck in the application performance. In the past however there were no easy tools to analyse SQL queries in a running application and we programmers had to depend on some makeshift solutions to debug SQL queries. Now, however there are some nice free tools which can help you profile MySQL application queries easily.

My favorite among them is Neor Profile SQL profiler. This is a desktop tool which allows you to easily profile your application SQL queries and also lets you query the same in a live application.

He starts with the changes to make to your configuration to point to the profiler for interception. This is then hooked into the MySQL database and queries will be profiled in real-time. The tool provides information like time of execution, number of rows returned, a graph showing the queries by type and includes the ability to run (or re-run) custom queries.

tagged: mysql database profile speed performance

Link: https://www.codediesel.com/mysql/how-to-profile-and-debug-mysql-queries-for-speed/

Colin O'Dell:
Optimizing league/commonmark with Blackfire.io
Jan 06, 2016 @ 18:47:38

Colin O'Dell has a post to his site talking about how he used the Blackfire.io service to optimize league/commonmark, a library that's a part of The PHP League making it easier to work with Markdown content in PHP.

As you may know, I am the author and maintainer of the PHP League's CommonMark Markdown parser. [...] This last goal [of being well-written and super-extensible so that others can add their own functionality] is perhaps the most challenging, especially from a performance perspective. Other popular Markdown parsers are built using single classes with massive regex functions.

He shares some brief benchmarks of parsing the same document with four different parsers, including an older version of CommomMark (coming in last, unfortunately). With the goal of optimization in mind, he tried out the Blackfire.io service to locate the bottlenecks in his library. Based on the results from the tests he found two optimizations that could be made relatively easily: switching from single-character parsing to regex and more correctly replacing newlines with breaks where needed.

tagged: commonmark blackfireio profile phpleague package markdown

Link: http://www.colinodell.com/blog/2015-11/optimizing-league-commonmark-blackfire-io

7PHP.com:
Michelangelo van Dam – 7PHP Interviewee VIP Profile
Jul 18, 2014 @ 14:55:37

The 7PHP.com site has a new community spotlight posted today, focusing in on Michelangelo van Dam and providing his "VIP profile" (links to information about him).

Links for Michelangolo include:

There's also several quotes included in the post about Michelangelo from other members of the community.

tagged: 7php interview vip profile michelangelovandam

Link: http://7php.com/michelangelo-van-dam/

Inviqa techPortal:
Profiling PHP Applications with XHGui
Oct 03, 2013 @ 15:53:32

On the Inviqa techPoral today there's a new post from Lorna Mitchell showing you how to profile your PHP applications with the help of the XHGui tool (and XHProf extension).

Profiling is a technique for observing the performance of an application, ideal for showing up bottlenecks or particularly intensive use of resources. Profiling gets inside your application and gives information about the performance of the various parts of code that are used during a request. [...] We have a choice of tools for PHP but in this article we’ll focus on an excellent tool called XHGui. XHGui is a tool built upon XHProf, the profiling tool released by Facebook, but adding better storage of metrics and a much nicer interface for retrieving information from it, to the extent that it feels like a new tool in it’s own right!

She walks you through the full installation, including other things the tool depends on (like MongoDB and the XHProf extension). She shows how to run the installer, configure a virtual host correctly (using mod_rewrite) and some example screenshots of what the resulting statistics report. This includes things like "wall time" and parts of the application that may be "memory hogs". There's also an example of a handy feature called the "Callgraph" that shows you a visual representation of the performance of the execution of the app.

tagged: techportal xhgui profile performance application xhref tutorial install configure

Link: http://techportal.inviqa.com/2013/10/01/profiling-php-applications-with-xhgui/

Hannes Magnusson:
Query logging and profiling in MongoDB
Sep 18, 2013 @ 15:25:49

in a previous post Hannes Magnusson introduced the new stream handling notification feature in the MongoDB PHP extension. In his most recent post he elaborates on a subject mentioned in the previous post - query logging and profiling.

In my previous blog post I mentioned that the 1.5.0 release of the MongoDB driver for PHP has improved notification support using the PHP Notification API, and showed off a fairly useless (but fun) progress bar. Now its time for a little bit more practical examples using this system: Query logging and profiling.

He talks about some of the features in his pull request, including the new constants added to help make working with the logging on streams easier. He includes some sample code that handles the logging via an "update" callback function, parsing the log message type and save the related data to a class variable. An instance of this class is then assigned to the "notification" stream and passed in as an additional option when creating the MongoClient connection. He includes an example of querying a basic collection and how to extract the request information from the logging object instance.

tagged: mongodb stream context tutorial log query profile notification api

Link: http://bjori.blogspot.com/2013/09/query-logging-and-profiling-in-mongodb.html

Lorna Mitchell:
Installing XHGui
Mar 07, 2013 @ 18:15:01

Lorna Mitchell has a new post today showing you how to install XHGui to help with profiling your application for performance and processing issues.

If you're not familiar with XHGui it's a fabulously easy and friendly way to profile your application; to understand which method calls in a page take the time and how many times they are made, so you can improve the performance of your application. All these instructions are for my 32-bit Ubuntu 12.10 system, hopefully they will work for you or you'll be able to adapt them as appropriate.

She lists the dependencies you'll need to have installed before you can get XHGui working correctly including a MongoDB instance and the PECL xhprof extension. With those all set to go, you can go grab the latest XHGui from github and drop it into place.

tagged: xhgui xhprof profile application installation pecl mongodb

Link:

Paul Reinheimer:
XHGui and MongoDB
Dec 26, 2012 @ 16:02:01

Paul Reinhemier has written up post sharing his creation of the code to get XHGui working with MongoDB.

Mark Story & I are pleased as punch to introduce XHGui on MongoDB. Our goal was to get as close to the original feature set of the tool I worked on a few years ago (which leveraged the starting point provided by Facebook) and then to release what we had. What we’ve got now works; there’s still a good distance to go, but we think it’s far enough that we can ask for help form the community at large.

The tool collects XHProf data and stores it into a MongoDB database and allows you to view recent activity. There's a few warnings that he includes with the post, so be sure to read those through if you plan on using the tool.

tagged: xhgui mongodb database nosql profile xhprof data performance

Link:

David Parra:
Probing PHP with Systemtap on Linux
Dec 05, 2012 @ 16:41:30

David Parra has a new post to his site today about a method of using Systemtap to profile PHP as the code executes (as an alternative when DTrace may not be available.

PHP introduced DTrace support with PHP 5.3, enabling probing points in the PHP executable that can be used to simplify probing of PHP applications without having to the PHP implementation details. We enabled probes on function calls, file compilation, exceptions and errors. But this has always been limited to the operating systems that support DTrace. With the popularity of DTrace, Systemap programmers decided to add a DTrace compatibility layer that allows to use DTrace probes as Systemtap probing points as well.

Thanks to a recent commit to the PHP 5.5 branch, your PHP installation (compiled with DTrace support) can be executed with the "stap" command and searched for probe points. He includes a simple Systemtap script that counts the calls of a specific function to get you started.

tagged: probe profile systemtap dtrace compile tutorial

Link:

PHPMaster.com:
Debugging and Profiling PHP with Xdebug
Nov 23, 2012 @ 18:58:31

On PHPMaster.com today there's a new tutorial showing you how to effectively debug your applications with Xdebug, a handy tool that provides more detail around your errors just by installing it.

Xdebug is a free and open source project by Derick Rethans and is probably one of the most useful PHP extensions. It provides more than just basic debugging support, but also stack traces, profiling, code coverage, and so on. In this article you’ll see how to install and configure Xdebug, how to debug your PHP application from Netbeans, and how to read a profiling report in KCachegrind.

He walks you through the installation process (installing it from a package, not compiling) and how to enable it in your "php.ini" configuration file. He also shows how to hook it into the debugger on your IDE (in this case Netbeans) to receive debug messages and be able to step through the code to easily locate the issues. Also included is some basic information about profiling your application and viewing the resulting data in something like Kcachegrind or Webgrind

tagged: debug profile xdebug tool tutorial install configure

Link:


Trending Topics: