Jump to content

Archived

This topic is now archived and is closed to further replies.

phporcaffeine

Long Parse times by PHP

Recommended Posts

I know this is like shooting a fish in the Pacific Ocean from 100 yards away but ....

I have several scripts, and they don't do anything intense ( no arrays, no queries ... etc)

All they do is take some given information and perform some mathmatical calculations.

Now when you execute through a browser, sometimes PHP finishes in miliseconds, other times it takes almost 40-50 seconds (on any given execution it is processing the same data, the same way). There isn't any indentifiable pattern to when it executes quick or slow.

These scripts run on a Win XP box with Apache 2.0.55, PHP 5.1.2, MySQL 5.0.19

The Server has 2GB of Ram with a P4 3.8Ghz Processor

There is no user load - this is a dev. box.

In PHP.ini the garbage collection for session data is set as 1/100

I'm just looking for someone who can tell me some areas that I should "look at" to help explain this oddity.

I want to know whats happening before I goto a production box, and I see this as a BIG deal because when you multiply this oddity X 200+ users .... etc


TIA

Share this post


Link to post
Share on other sites
hrm maybe you can show us the code so we can take a quick look through it?

Share this post


Link to post
Share on other sites
[!--quoteo(post=370039:date=Apr 30 2006, 01:01 AM:name=Hooker)--][div class=\'quotetop\']QUOTE(Hooker @ Apr 30 2006, 01:01 AM) [snapback]370039[/snapback][/div][div class=\'quotemain\'][!--quotec--]
hrm maybe you can show us the code so we can take a quick look through it?
[/quote]

Here is the script in question:
<?php

//GET STAMP

$savedstamp = trim($_POST['stamp']);

$seconds = $savedstamp%60;

$i = floor($savedstamp / 60);

?>

I honestly think this has something to do with php.in and/or httpd.conf. I probably have something set I shouldn't have or vicea versa.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.