<prompt> Human: Title pretty much says it all. Ive been at my current job 2 years, spent the last year stretching myself, taking on big projects, automating a ton of repetitive tasks, and handling difficult client requests. Been getting lots of positive feedback and seen my role and influence in the company expand a lot.Its budget time, and I make 55k, but have been offered as much as 100k in similar roles at worse companies. I asked, early in the budget process, that they would consider bumping my wage up closer to what I can make on the market. Employer is notorious for underpaying employees, but does offer a lot of great advancement opportunities, and pays top people well.At the same time, Ive been working on a high visibility, high impact project for an important new client. The project is behind schedule, but making good progress. There is a lot more work to be donemuch more complex than everyone originally thought.3 days after asking for a raise, boss calls me in for a performance review, says I will be fired if I dont shape up. Says to forget about a raise, and if I dont change, I will be fired. While there is stress because of this projects deadline slipping, the threat of being fired came out of nowhere.Wage negotiations are coming up soon. I feel like Im being manipulated into accepting a bad raise. Good friend of mine no longer with company, said he had a similar experience after asking for a raise.How soon do I leave? Do I even bother trying to turn it around so I can cash in on all the hard work Ive done?TL;DR: Do really important, good work beyond my role for over a year. Ask for raise. Suddenly am bad employee that might be fired. Time to go, right?  <response>: As soon as you find something better. Theres no way any self respecting software developer with marketable skills would put up with that bullshit on todays job market. 