Getting to the airport a few hours before your flight is something that all experienced travelers would recommend. There's nothing worse than being pressed for time and finding that the line for airport security is going to take longer than you have. It's common for unexpected events to occur, such as being selected for a bag screening, which can tack on a significant amount of time before you'll get to your gate.
At most airports, officials will try to help travelers in a rush get to their flights on time. If you didn't plan ahead and are going to miss your flight if you continue to wait in line, ask a nearby staff member to assist you in moving to the front. No matter how stressed you are, it's always best to be polite to the airport security officials. They're working to ensure everyone is safe, which can be stressful as well. It's always a good idea to be polite to airport staff, as they'll be less likely to assist you if you're rude or aggressive.