PDA

View Full Version : Slow communication with PHP


thopol
09-16-2005, 12:20 PM
Hi,

Im using flash remoting with AMF PHP and I mostly use it to get data from the db from an internet server.
My problem is that results from the database sometimes are travelling quite a long time, mostly I have to wait few seconds to get a small array. I suppose the problem is with communication between Flash and PHP, maybe something with Flash remoting or the AMF PHP module, I can't really say cause i'm not an expert in this topic and I might be wrong.
I've been testing performance of the queries and I found that the hardest ones took less than 0.05s so Im sure that MySQL is not the problem. Ive been also testing the site on a server in my LAN and everything was rocking. It may look like a problem with my bandwith but i'm working on a 2mbit connection and other stuff like images or Movie Clips are being downloaded in less than a second.

Does anybody know where could the source of the problem be?

Thanks in advance,
THopol

klangdon
09-23-2005, 09:20 AM
Using a tool like ServiceCapture (http://www.kevinlangdon.com/serviceCapture) you could identify if the problem is in the network traversal or serialization/deserialization of the data.

On the performance tab of the Remoting requests you will see the times for the requests and the size of the data. I would guess that the data returned is fairly large if it works quickly over the LAN and not so over the web.

ServiceCapture will also allow you to similuate slower bandwidth speeds from inside the LAN.