Last September, I wrote that Twilio's (TWLO -2.71%) spending was "out of control." The communications software provider was spending heavily to drive growth under the guise that eventually, with enough scale, profits would come. But Twilio's gross margin had been deteriorating for years, and there was no reason to believe the company could grow its way out of its predicament.

Later in September, Twilio announced its first round of layoffs. The company disclosed it was parting ways with 11% of its workforce, although there wasn't much strategy behind the move other than to bring down costs.

On Monday, Twilio unveiled a much broader restructuring plan aimed at pushing the company toward a sustainably profitable future.

More layoffs and some structural changes

In a letter to employees on Feb. 13, Twilio CEO Jeff Lawson announced that the company was shedding another 17% of its workforce. Unlike the first round of layoffs, this second round was more than just a blunt effort of reduce costs. Twilio is splitting into two business units, each with very different needs. Under this new structure, it became clear to management that one of the units needed to become far more efficient.

Twilio's new communications unit will house the core products the make up its platform. These products, which include APIs for sending text messages programmatically, are mature and have tough unit economics. Twilio's overall gross margin hovers below 50% because the company must pay fees to network service providers. This low gross margin leaves much less left over for other costs compared to a typical software provider.

In the communications unit, the name of the game is now efficiency. In the software segment, which houses products including Segment, Flex, and Engage, the goal is to accelerate growth. These software products have the potential to boost Twilio's gross margin, but the current structure proved to be stifling.

While Lawson argued that all of the company's products work well together and complement each other, the new structure will see separate sales, research and development, and operational resources dedicated to each unit. This may seem less efficient, but with each unit having different needs and goals, the separation makes sense.

On top of the second round of layoffs, Twilio is withdrawing some of its employee perks. The company is getting rid of book and wellness allowances, and it's winding down Twilio Recharge, its paid sabbatical program. Twilio is also shifting more toward remote work, with the company planning to close some offices this year.

Back to reality

Twilio reported a net loss of $482 million on $983 million of revenue in the third quarter of 2022. There were some restructuring and impairment costs thrown in, but even backing those out, there's no question that Twilio is a profoundly unprofitable company. Free cash flow through the first nine months of 2022 was a loss of more than $200 million, and that's after adding back more than $600 million of stock-based compensation.

The stock market rewarded growth-at-any-cost for much of Twilio's time as a public company. Sentiment shifted hard last year, and Twilio, along with plenty of other unprofitable tech stocks, tumbled. The promise of future profits is ringing hollow. Investors want profits now.

After two rounds of layoffs, Twilio finally appears to be on the right track. Time will tell whether the new operating structure can deliver the efficiency the company needs to produce a sustainable profit, but at the very least, it appears that Twilio has finally shaken the growth-at-any-cost mindset that got it into this mess in the first place.