Tesla shares surged 17.7% on Thursday after the company posted a surprise profit for the third quarter. While many on the Street said it was a solid report, some are calling for caution based on growth concerns and falling margins.

Analysts pointed to a decline in revenue as one big thing for investors cheering this report to worry about.

"The one very concerning aspect of the quarter was that top-line growth reversed to a decline, with 3Q:19 deliveries up a mere 2% sequentially from 2Q:19," Bank of America analyst John Murphy wrote in a note to clients, adding that it was "the first decline in seven years for a 'growth' company." He has an underperform rating on the stock, and a $235 target.

Revenue came in at $6.3 billion, which was a little short of the expected $6.33 billion, according to estimates from Refinitiv and down from $6.8 billion a year ago.

But investors chose to focus on Tesla's adjusted earnings per share of $1.86 versus an expected loss of 42 cents per share. Also the electric-vehicle maker gave an update on its new Shanghai Gigafactory, where the company said trial production runs have begun. Tesla said it was ahead of schedule on the long-awaited Model Y crossover vehicle, as well.

Often accused of spending too much, Tesla's surprise profit led some analysts to say the company's narrative may be shifting. But RBC Capital Markets' Joseph Spak said that in order to keep up with growth targets the company will have to keep spending, and that "longer-term growth expectations built into the stock are ... too aggressive."

"Cost control can help a quarter, but we struggle to understand how spending doesn't have to go up to support Tesla's growth ambitions," Spak said. He has an underperform rating on the stock and a $220 target.

Bernstein's Toni Sacconaghi said it was a "good quarter," but that it had "eerie similarities" to the same period a year ago. In the third quarter of 2018 the company also posted blowout results, but then Tesla faced multiple headwinds that caused the stock to tank.

The shares are down 23% this year, and 12% over the last year through Wednesday.

"We worry about: (1) another demand air pocket in Q1; (2) the margin impact of ramping Shanghai & Model Y; and (3) any potential reversal in this quarter's margin tailwinds," Sacconaghi wrote in a note to clients. The analyst has a market perform rating on the stock, and a $325 target.

How to value Tesla has traditionally divided the Street, which is why the company's revenue is so important. The bulls contend that Tesla should be valued like a momentum tech name, while the bears say it should trade at a valuation closer to a car company.

Given Tesla's top-line slowdown, Murphy said the automaker might be pursuing a new strategy focused on profitability and cash flow rather than growth. "With this in mind, we have to question whether the valuation premium being ascribed to TSLA as a 'growth' or 'technology' unicorn is truly justified," he said. RBC's Spak echoed this point, saying "as Tesla is valued as a growth story, we believe that as the market comes to appreciate growth is absent over the next few years and longer-term expectations come down, so too will the valuation."

— CNBC's Michael Bloom and Lora Kolodny contributed reporting.