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

Anna Filina:
Reduce number of queries
October 29, 2014 @ 10:53:10

In her most recent post Anna FIlina makes a recommendation to those looking to increase the performance of an application, especially one that's already in place: simply reduce the number of queries. It sounds simple enough, but can sometimes prove to be difficult depending on the application.

Customers often call me because their site is slow. One of the most common problems I found was a high number of queries that get executed for every single page hit. When I say a lot, I mean sometimes more than 1000 queries for a single page. This is often the case with a CMS which has been customized for the client's specific needs.

In this article, aimed at beginner to intermediate developers, I will explain how to figure out whether the number of queries might be a problem, how to count them, how to find spots to optimize and how to eliminate most of these queries. I will focus specifically on number of queries, otherwise I could write a whole tome. I'll provide code examples in PHP, but the advice applies to every language.

She suggests starting from "the top", looking at the browser's own information on which pieces of data are taking the longest to return back to the client (the latency). This gives a starting direction and tells you where to look for the worst offenders. She talks about a technique to locate and count the queries being made and some common issues found in multiple kinds of software (hint: loops). Then she gets down to the optimization - combining similar queries and better queries through joins.

0 comments voice your opinion now!
query database performance join similar tips

Link: http://afilina.com/reduce-number-of-queries/

Hartmut Holzgraefe's Blog:
PHPReboot Braindump
October 11, 2011 @ 10:22:51

In this new post to his blog Hartmut Holzgraefe looks at a new effort that wants to be "the next PHP" while still being PHP. Confused? Take a look at PHPReboot.

PHP.reboot is a reboot of PHP, each Hollywood movie has its own reboot, why not doing the same for one of the most popular programming language. The aim is to keep the philosophy of PHP but adapt it to be more in sync with the Web of 2010.

Hartmut's post is a "braindump" of some of his thoughts about the project including responses to some of its main claims:

  • less $, less ';' like in javascript
  • secure by default: no eval, no magic quotes/string interpolation
  • full unicode support
  • a SQL compatible syntax
  • URI/file literal

In his opinion, the language doesn't look much like PHP anymore and would not only be incompatible with current PHP but also wouldn't benefit from the C libraries PHP has access to.

...so why should it have the letters PHP in its name at all?
0 comments voice your opinion now!
phpreboot project language reboot similar opinion


Chris Shiflett's Blog:
Technical Vocabulary and Grammar
January 20, 2006 @ 06:50:51

It's not strictly PHP related, but Chris Shiflett has posted this new item on his blog today with a look at some technical vocabulary and grammar.

I sometimes wonder why people feel so compelled to use technical terms when talking about computers, even when they don't know what the terms mean. In my experience, those who know the least about a particular topic use the most complicated vocabulary when discussing it. I considered compiling a list of the popular ones, but since I'm lazy and have a blog, I decided to blog about it instead. Feel free to add to the list.

He mentions the incorrect use of the term "computer" when referring to hardware (overgeneralization), the confusion over very similar technical words (i.e. Orientated and Oriented, Depreciated and Deprecated), the pluralization of company names, and various other issues. Be sure to check out the comments for even more...

0 comments voice your opinion now!
technical vocabulary grammar pluralizing similar words overgeneralization technical vocabulary grammar pluralizing similar words overgeneralization



Community Events





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


opinion language laravel podcast security conference interview artisanfiles version composer community tool list release series framework voicesoftheelephpant symfony introduction library

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