3
votes
2answers
230 views

What's a good simple way to combat the n+1 problem?

I'm trying to better understand performance in PHP. One issue I'm thinking about is the n+1 problem. By n+1 I mean something like this: $posts = Posts::getPosts(); foreach($posts as $post) { ...
0
votes
2answers
102 views

How should I create object after database insert PHP

I have just been working on a new project and doing things the same way I have for years now. However for the first time, I am constantly thinking about scalability and performance of both the ...
-4
votes
2answers
332 views

True/false on the left or the right? [duplicate]

I have heard that generally, an expression like: if (true === $variable) is faster than: if ($variable === true) My question is about the performance, not the readability. Questions such as this ...
3
votes
1answer
128 views

Should a stored proc try to do more, in the attempt to avoid php mysql back and forth overhead

I have a REST architecture, running PHP on the server side which store and query a Mysql database. I am re-evaluating one architecture design decision: DECISION to re-evaluate: In an attempt to ...
0
votes
1answer
44 views

Mail Server Caching

I'm currently working on a web mail client. When a user logs in, I'm fetching all the mails from the INBOX from the beginning of time. As expected this is pretty darn slow. I'm planning to implement ...
0
votes
2answers
228 views

Is this a good measure of PHP script usage of the system?

I've been trying to see a way to get a measure of how much a PHP script costs of memory to the server. Well, I've found some solutions out there that requires some software to make tests and even ...
0
votes
2answers
199 views

The best way of coding web system in term of performance [closed]

So far I've been using IPB and my custom scripts all coded in PHP but I am really disappointed of the long term performance of it. I would like to move to native coding, the learning time to put into ...
2
votes
1answer
449 views

Is there's a way to speed up my php code which parse XML files

I'm developing a web application and we are using XML as a database and I'm using Linux as a platform and centos 6.5 as a server. Changing some value would make a lot a lot of changes in about six XML ...
2
votes
2answers
1k views

memory and time intensive php task

Sorry if this question has been asked before, but I couldn't find anything usable. I'm working on a project for a client and currently I have to loop through the users table which is about 3000 ...
6
votes
4answers
545 views

Is there a performance benefit to using immutable objects in a scripting language?

As I understand it, writing your objects in an immutable style can help the performance of your program for compiled languages, as the compiler tends to rewrite your code in single static assignment ...
1
vote
4answers
1k views

How do I speed up XML parsing operation?

I currently have a php script set up to do some xml parsing. Sometimes the script is set as an on page include and other times it is accessed via an ajax call. The problem is the load time for this ...
0
votes
3answers
2k views

PHP vs C# performance

I have a application that is part console application written in C# and part PHP web application. The console application connects to multiple serial devices and reads data pertaining to moisture ...
6
votes
6answers
2k views

Do variable names affect the performance of websites?

Do variable names affect website performance? I know this will going to be very low number, but still can any one provide the reasons for not choosing a long variable name in aspect of performance?
2
votes
1answer
268 views

Cost of heavy autoloading in PHP applications?

I have an application which does heavy autoloading, meaning, that only two classes are "included" directly. For every module tha the application has (total like 14 modules), that module defines an ...
1
vote
4answers
207 views

Will LAMP meet the following needs?

I remember a few years back, when I had a web-site I wanted to develop, that many people recommended I go the LAMP route. Unfortunately, I never got around to studying/practicing that. I'm currently ...
4
votes
6answers
3k views

PHP email blasts using a cron job

My PHP application needs to send product expiry notifications to customers everyday. I am thinking of: A one-time cron job for a php script that identifies the customers from a table of 10000 rows ...
2
votes
4answers
1k views

How to speed up PHP powered websites? [closed]

Many people are talking about somethings like accelerator, opcode, etc to speed up a website's performance. To be honest I do not know how to make any PHP website perform well and when do I need to ...