The new housing that developers have been building in America’s cities in recent years hasn’t necessarily been cheap housing.

This is perhaps most glaringly apparent in Manhattan, where the prices of condominiums in the skinny skyscrapers going up just south of Central Park range from $17 million to $100 million. But it’s true even in Houston, where developers have been putting up lots and lots of apartment buildings. This is from the May “Economy at a Glance” report by the Greater Houston Partnership, a regional business group:

“With a few exceptions, developers don’t build Class B units. Of the 24,000-plus units currently in ’lease-up,’ only 500 are Class B. Sub-A inventory tends to expand as properties age, floor plans become dated, and structures deteriorate. Only if owners neglect their investments during the downturn will we see a large number of Class A units slide into the Class B market.”

Class A apartments in Houston currently have an average rent of $1.53 a square foot, which will sound cheap to many New Yorkers but is out of reach for many Houstonians (and a lot of New Yorkers too, actually). Class B apartments rent for an average of $1.09 a square foot, Class C 89 cents, Class D 72 cents.

Demand for new Class A apartments is faltering in Houston as the region’s economy cools. Rather than cutting rents significantly, developers are offering incentives such as “gift cards, Apple watches, flat screen televisions, seven-day cruises, and move-in allowances, in addition to several months free rent.”

This unwillingness to lower rents in the face of weak demand can come across as pretty perverse. In a 2014 Alternet essay about how “corrupt oligarchies” have ruined Houston, novelist Anis Shivani complains of new luxury buildings that displaced his bohemian neighbors only to stand “largely empty.” You can’t entirely blame the guy for being ticked off.

advertisement | advertise on newsday

And more generally, it’s easy to see where the widespread belief among anti-growth activists that new construction raises prices comes from: when a new building goes up in an urban neighborhood, the rents or purchase prices for its units often are higher than for surrounding older buildings.

Still, there’s ample evidence that housing is more affordable in cities that allow lots of new construction than in cities that don’t. This makes economic sense — more supply should drive down prices. But as you can see from the Houston example above, those prices can be sticky. The process of converting housing development into housing affordability takes a while.

Here’s a passage from City Observatory’s Joe Cortright:

“In the United States, we have almost never built new market-rate housing for low-income households. New housing — rental and owner-occupied — overwhelmingly tends to get built for middle- and upper-income households. So how do affordable market-rate housing units get created? As new housing ages, it depreciates, and prices and rents decline, relative to newer houses. (At some point, usually after half a century or more, the process reverses, as surviving houses — which are often those of the highest quality — become increasingly historic, and then appreciate.)”

There is another way to create affordable housing: by subsidizing its construction with either tax dollars or requirements that developers include below-market units in their projects. But tax money for such projects has been scarce for decades, and mandating affordable units hasn’t created much housing either. The most straightforward long-run solution to too-high housing prices is simply allowing developers to build more housing — especially rental housing, which, according to research by Syracuse University economist Stuart S. Rosenthal, “filters” down to lower price levels much faster than owner-occupied housing.

But again, it’s a long-run solution. Consider the blog post on San Francisco housing costs published Saturday by Eric Fischer, an Oakland, California, data artist and software developer, which has been getting a lot of deserved attention this week.

San Francisco has the nation’s highest rents, with the median one-bedroom apartment in the city going for $3,560 in April (in Houston the median was $970). Fischer wanted to figure out why rents had gotten so high in the city. He compiled median rent data from 1948 through 2015, first using the San Francisco Housing Study DataBook’s survey of apartment rents for the years 1979 through 2001, and then perusing ads in the San Francisco Chronicle and Craigslist to get numbers for the other years.

He found that after falling in the late 1940s and early 1950s, San Francisco’s median rent has risen at a 6.6 percent annual pace since 1956. That’s 2.5 percent on top of inflation — which means that rent has quadrupled in real terms.

advertisement | advertise on newsday

One interesting discovery Fischer made was that rent control, instituted in San Francisco in 1979, didn’t have a discernible impact on the trajectory of rents. What did? Fischer built a model that was able to explain most of the variation in rents in terms of changes in San Francisco’s housing inventory, wages and employment. Over time, then, it’s the interaction of supply and demand that drives rents. And since the mid-1950s, when San Francisco ran out of large tracts of vacant land to develop, supply has been constrained.

According to Fischer’s model, getting real rents back to where they were in 1981 — a year he picked because that’s when an anti-development journalist he cites moved to the city, and real rents were about one-third of current levels — would require:

—A 53 percent increase in housing supply (200,000 new units)

—A 44 percent drop in Consumer-Price-Index-adjusted salaries, or

—A 51 percent drop in employment

advertisement | advertise on newsday

Huge drops in salaries and employment would be terrible. And while a San Francisco with 53 percent more people could be perfectly nice (its population of 1.2 million would be about the same as Milan’s and Prague’s, and its population density would still be markedly less than Brooklyn’s), getting there in just a couple of years would be miserable. More important, it would also be impossible.

As Portland, Oregon, journalist Mike Andersen put it in an illuminating commentary on Fischer’s work:

“The problem is that rapidly turning into Prague would require thousands of developers to go bankrupt, because (remember?) rents would drop by 67 percent so all those developers would not be able to pay off the loans they took out to build those 200,000 new homes. . Which is why there could never be a situation where private developers would add that many new homes at once — they would stop building long before that return to paradise could happen.”

Barring an economic disaster, then, San Francisco simply can’t go back to having rents as low as those of the early 1980s. And while the only reliable way to slow the rise in rents in the future is to build much more, denser housing, neighbors of that new development will not only complain about it blocking their views and taking their parking spaces but will often correctly perceive that it is priced higher than existing local housing. So they will fight development, not enough new housing will be built and either rents will keep rising or the city’s economy will stop growing.

It’s really hard to see a way out for San Francisco. For other in-demand cities where rents are still in more reasonable territory, the lesson (I’m channeling both Andersen and City Observatory’s Daniel Hertz here) seems to be to let the developers keep building and building. The apartments they choose to build might actually be pretty expensive. But they’ll get cheaper eventually.

Justin Fox is a Bloomberg View columnist writing about business