As the proverb goes, the early bird gets the worm. But no one talks about how the bird who gets the worm sometimes ends up suffering from sleep deprivation.

One such bird is Pentair (NYSE:PNR), which makes pumps and filtration systems as well as enclosures for electrical devices. The company looked a little drowsy last quarter after taking early action to mitigate damage caused by the recession. It took on substantial costs to cut its exposure to some weak areas of its business, and its bottom line suffered as a result. But reporting one quarter of poor earnings beats remaining overstretched and less profitable in the long run.

The damage
Still, it was a poor quarter. Demand for Pentair's products waned, as sales fell about 5% to $768 million. That's not terrible, but the drop in earnings from various charges was much more severe, as net income fell 91% to $4.6 million, or $0.05 per share.

Nevertheless, while the numbers were ugly, Pentair took big steps forward to deliver bigger profits this year. By exiting its spa and bath operations to focus on its core pool equipment business, Pentair is positioning itself to finish 2009 in decent shape.

The bigger picture
Obviously, to some investors, dips in quarterly results matter less than the bigger picture: a company's potential over a longer time horizon. This sentiment especially holds true when the reason profits are falling short is because of actions taken specifically to improve long-term prospects.

Management expects its cost-cutting measures from workforce reductions alone to produce annual savings of $85 million starting this year, growing to $95 million to $100 million in 2010. That's a common theme throughout the industry, as competitors A.O. Smith (NYSE:AOS) and IDEX (NYSE:IEX) have also taken measures to reduce overhead.

As the company sees it, its consistent operating cash flow, which exceeds net income, will allow Pentair to continue paying its dividend, which it has regularly increased for more than 30 years. The company's full-year guidance calls for earnings between $1.70 and $2.00 per share.

Propers for Pentair
By reducing its workforce and closing facilities, Pentair has been taking the actions necessary for survival. While they seem costly now, the benefits should pay dividends both during the downturn and well into the future.

Frankly, that's why I believe we should applaud companies like Pentair when they sacrifice quarterly results in the spirit of improving future performance. The stock still isn't a huge bargain, with a 13 to 15 forward earnings multiple based on the company's guidance. But in a market where many companies seem to be in denial about their prospects, you could certainly do worse than looking at Pentair.

More Foolishness:

Fool contributor Chris Jones has neither long nor short positions in any of the companies mentioned in this article. Try any of our Foolish newsletters today, free for 30 days. The Motley Fool's disclosure policy always gets the worm.