I have made a simple IRC bot for myself in python which works great, but now some friends has asked me if the bot can join their IRC channel too. Their IRC channels are very active, it is Twitch chat(IRC wrapper), which means a lot of messages. I want them to use my bot, but I have no idea how it will perform, this is my first bot I've made.  
Right now my code is like this:
Connect to IRC server & channel
 while true:
     Receive data from the socket (4096, max data to be received at once)
     do something with data received
What changes should I do to make it perform better?
1. Should I have a sleep function in the loop?
2. Should I use threads?
3. Any general dos and don'ts?      
Thank you for reading my post.
Threading is one option but it doesn't scale beyond a certain point (google Python GIC limitation).  Depending on how much scaling you want to do, then you need to do multi-process (launch multiple instances).
One pattern is to have a pool of worker threads that process a queue of things to do.  There's a lot of overhead to creating and destroying threads in most languages.
IRC Bot, performance and scaling