Re: Why is this script so slow?



On 18 Mar 2007 14:10:18 -0700, in alt.php "kenoli"
<kenoli.p@xxxxxxxxx>
<1174252218.374723.246040@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

| The following code is extracting all fields from all records from a
| mysql database that has about 250 records in it. Firefox takes over
| one minute to extract these records and display them in rows in a
| table using the code included below. Safari takes about 30 seconds.
| Even after the page displays, the scrolling is a little eratic.
|
| When I use another script to extract the same data and display the
| first and last names in one column, it takes about 3 seconds from
| start to finish. So I believe it is not the database or the server.
| I can only conclude it is the script.
|
| I pulled as much html our of print(), echo() and heredoc commands as
| possible. I had suspected the "if" conditionals that set the check
| boxes as checked or not and tried various options here like setting
| these values to variables and inserting the variables into the html
| instead of the whole statement and even removing them altogether and
| nothing changed.
|
| I've used the same select/option code in other scripts that work fine.
|
| Help. What is my problem?
|
| Thanks,
|
| --Kenoli
|
| I've included the query and the while loop that creates the table rows
| of concern.
|
| If you want to see it operate in real time, you can try it out here:
|
| http://sfnan.org/nandb/pages/lookup_results.php?all=all
|
| It's not live data.

Apart from the 2,250 errors that http://validator.w3.org picked out
the most obvious one is
<input type="hidden" name="id[]" value="{$row['person_id']}">
---------------------------------------------------------------
jnorthau@xxxxxxxxxxxxxxxxxxxxx : Remove your pants to reply
---------------------------------------------------------------
.



Relevant Pages

  • Problems using Expect to parse a file
    ... I'm trying to write a script to automate a program called DeltaE, a powerful thermoacoustic design tool, and to extract performance data from the simulations it runs by parsing through its output files. ... Less, on the other hand, remains open upon reaching the end of a file until it receives the "q" command, so I tried writing a script to step through the file using that, as follows: ... The trouble now is, although manually executing the command "less -c data/1.out" at a tty functions just as you would expect it to, when Expect sends the exact same command as part of the spawn process, and running the script with exp_internal true, apparently none of the data sent to the display by less when started normally is being seen by Expect - all it seems to get is "No tags file\r\n", followed by eof and closure of Less - I'm afraid I haven't a clue what the "No tags file" statement means. ...
    (comp.lang.tcl)
  • Re: Why is this script so slow?
    ... mysql database that has about 250 records in it. ... When I use another script to extract the same data and display the ... If it is a browser rendering problem then it could be confusion in the ...
    (alt.php)
  • Re: [PHP] entering in text data and losing the
    ... Randy Johnson wrote: ... > When the user submits the data it is saved to a mysql database in a field of type text. ... > When I extract the data from the database and display it in php it loses the line return and the data is all crammed together. ...
    (php.general)
  • Why is this script so slow?
    ... mysql database that has about 250 records in it. ... When I use another script to extract the same data and display the ... I can only conclude it is the script. ...
    (alt.php)
  • Displaying images stored in mysql via webbrowser
    ... I have written a perl script that is intended to be use via cgi. ... Given search parameters of a first and/or last name the script searches a ... mysql database and in return is intended to display an image of that person. ... believe I am displaying the data retrieved from the mysql database incorrectly. ...
    (comp.lang.perl.misc)

Loading