I am delivering my php scripts from a new Apache server on CentOS delivering them only at the end of the loading. What is a pain, especially for pages being used by iOS apps just needing the xml section even if the script goes further, or when presenting information while they are generated. How do I change this behavior? Thanks, Fabrizio Bartolomucci
Sometimes, especially with Chrome, the browser prints all contents from a php script only at the end. This creates problems when logging some long process where the screen remains blank all the time defeating the logging, and especially when a script doing some processing after returning data is executed by a iOS app, thus delaying the feedback. Luckly this latter effect seem not to happen, possibly in virtue of the NSUrlConnection timeout, I do not know. In particular I am not clear whether this effect depends on the broswer or on the server: you may see the effect, for example, at: http://www.taxiprofessional.net/iPhone/inarrivo/php/testInsertBus.php?bus=06
The lagging is caused by the server. You are going to have to refactor your database queries to speed up the process. Try adding pagination to make the experience smoother for the user.