I was wondering how I can actually optimize my code.
I’m trying to write a chat application and I had wanted my messages
saved into my database.
Imagine a browser with a chat window, you type in your message, click
the send button, render the message on the chat window on the same
browser then save into the database.
1 sec. With databasing included, it takes 4-5 secs before the text gets
rendered into the div (I was counting one thousand one, one thousand
two, one thousand three… )
Code for saving into the database is really straight forward, nothing
fancy in the def.
Was wondering if you could help me out how to make this much faster.