Hi Pete,

> >> The uploading and resizing itself takes a reasonably short
> >> time.  But to get started can take three or four minutes!
> >> I have added timers to see where the delay is.  The first
> >> timer, just before the upload function, shows the delay.
> >> A timer just after the upload function shows that the
> >> upload didn't take too long.
>
> >I would say the delay is in the upload. Maybe PHP just
> >starts processing the data when al data regarding the request
> >have been received, wouldn't be too strange to behave like that.
>
> You may know more than me, but I can't see that - as I said, I have a
> timer call just before the upload function - it kicks in sometimes 4
> minutes after clicking submit.  Why the delay BEFORE the function?

The timer is in the script being called when clicking the submit button, no?

So first ALL data regarding the request (including sending the data from
form fields PLUS uploading the nine images) is done, and then the script
starts being processed. Which means effectively the timer starts AFTER the
upload of the images. This means your timer does not see the time the upload
takes.

Hence my suggestion:
> >You could check (double click the network icon in the system tray in
> >windows, there must be an equivalent in Linux as well, but
You can see data being transmitted (count of packets out still increasing).
When the count of packets out more or less stops, is when the server starts
processing the script, using the data it has received. So amongst some
things, it starts the timer at that moment...

> Mine is asynch (?) - 256 each way, by radio in the mountains in Spain.
Ah, I had such a line here in interior Brazil as well. Got slower on hot
days because the effect of the heat, creates 'lenses' of air due to density
differences (the same reason why looking at something distant in a desert
this always seems to be out of focus and moving). The short wave radiation
(almost microwave) used for this type of radio internet is sensitive to this
effect as well. Anyway not a very fast connection so you will see the
effect.

Back to the topic:
Did you test the page locally (Apache server on your own machine, PHP
installed etc, and call the page at http://localhost/~site_X/page.php) and
how did it work there?
Bet it was much quicker due to negligible upload time but nonetheless your
timers show the same results as the results from the timers in the script on
the remote server.

> That's not what I meant.  The two main timers are called before, and
> after, the upload function.
What is 'the upload function'?
In the page displayed in the browser there will be a <form action="URL"
enctype="multipart/form-data"> tag and a file input. This is what makes the
upload to take place, independent of what scripts there are on the server.
If you create a HTML page with only these elements, there WILL be data
uploaded to the server hosting the page referred to in the action="URL" tag.
There they are stored in a quarantaine location until the script indicaed by
"URL" will start doing something with them.

So, server side, on the script being executed, there will be a function,
procedure, routine, part of your code, whatever, called 'the upload
function', doing something with $_FILES[], but to be able to do this
something, it must first have received the data to populate $_FILES[].
Unless you do some magic, I do not see a way to call a script starting a
timer, and only then starting uploading the data for the script (and the
functions/procedures contained therein), and only after that start
processing (resizing, storing, doing other things, then generating HTML to
the client) these data. In other words: your timer simply is NOT timing the
upload time, and it is exactly there that what is causing the delay.
Marc



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to