RES: PHP performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----Mensagem original-----
De: Jochem Maas [mailto:jochem@xxxxxxxxxxxxx] 
Eric Butera schreef:
> On Mon, Mar 3, 2008 at 6:18 PM, Chris <dmagick@xxxxxxxxx> wrote:
>>  > Just FYI, using ADODB will slow down the performance of your app.  
>> Any  > function calls cost against you and it all adds up.
>>
>>  If you remove it, then you remove functionality - so before you go 
>> and  rip it out, check whether it's the bottleneck using xdebug.
>>
>>  I use an abstraction layer all the time and the benefits far 
>> outweigh  the 'costs'.
>>
>>  --
>>  Postgresql & php tutorials
>>  http://www.designmagick.com/
>>
> 
> Hi Chris,
> 
> These 'benefits' you talk about really only matter if you switch your 
> databases.  If this app is written against Oracle and they never plan 
> to change it, then it isn't a bad idea to cut out that fat and just 
> deal with the native interface.  Even writing wrapper functions that 
> are very basic that abstract mysql_query or mssql_query end up adding 
> a lot of overhead over lots of requests.  Look at some of the PDO 
> benchmarks.  It is slower than the native functions too because it is 
> just a wrapper.
> 
> Even further if you are writing an app where you care about 
> performance you should be writing your SQL to the point where it 
> really isn't portable using all the little vendor specific 
features so 
> that you get the most out of it.
> 
> From my personal profiling most of my application time is spent in 
> data access.  So the less layers you have there the faster it runs.

the adodb php layers are insignificant compared to the cost of 
the db connection and the round trip to retrieve data from the 
db. the significant application time you speak of is undoubtly 
spent at the database performing and retrieving the data as 
opposed to measurable overhead caused by a [number of] wrapper 
function[s].

high probability that SQL related tweaks (indexing, query 
restructuring, db tuning) will win you much, much more than 
removing any db abstraction layer

> 
> But that is just my 2cents on it.  :)
> 

<me>
	First of all, thanks for helping me out :)

	The vb.net stuff does a lot of business and database stuff, it's
really tied up with the app. Actually I've no idea how it works internally,
all I know is that we send data strings via socket and it returns the
results the same way. It's kind of a black box. :/

	I'm going for:
		Tune SQL and move a lot of heavy queries directly to
procedures/functions in BD
		Tune apache
		Perhaps switch from PHP4=>5 (if I'm allowed to)
		Try memchache

	We had a talk with a sysadmin and tried installing xdebug in the
server, but it's a RHEL4AS w/o php-devel packages (phpize) and we can't find
a RPM for that.... anyone? :)


Thiago
</me>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux