In my database(mysql), I have a table which has 50k data(rows/records).
I do a test using firebug, after playing the game, the call to load_score.php and save_score.php is around 380ms (millisecond).
The save_score.php just a normal inserting, nothing much. The load_score.php, I use this query:
SELECT name, score
FROM `highscores`
WHERE id =1
LIMIT 0, 10
- The result returns 10 rows
- the query returns in 0.0005 seconds (tested using phpmyadmin)
- I echoed the data back to flash.
But on my game (flash), it tooks 11 seconds(count manually) to load and save the score. Why the time differences is so big?
Could it be the problem when Flash received php data, the process to display is slow??
Are there any others reasons on why the displaying take longer time??
(If you need more information, please let me know)
Firebug Testing Result:
================================================================
= File | firebug time | actual/on web time =
================================================================
= load_score.php | 435 ms | 5 seconds(before it calls save_score.php)
= save_score.php | 643 ms | 4-5 seconds(before displaying highscore table)
================================================================
So the total time to display the highscore = ~10 seconds