This is probably an age-old issue here, and I'm probably just plain stupid not to figure this out by myself, but anyway.
I don't neet code snippets - I just need the principle, pseudo-code if you like. The basic HTTP-chat is made with two frames etc. I know all this. I also already worked out a system where the user inputs sometihnd and it gets stored in the db, and in the other frame a loop is going on.
The loop is the problem. I checked my procesor usage, and it was around 100% with only one instance of the browser connected to the chat. This was probably the result of using mysql_pconnection instead of the non-persistent.
Now, how do you guys do it? (the free PHP chat software is written in a manner I can't figure out - I have a way sloppier approach =)