The California Energy Commission voted this week to require that new homes be built with rooftop solar panels, a measure with an obvious environmental rationale that critics in the homebuilding industry argue will add nearly $10,000 to the cost of building a home.

Given the overall state of California’s real estate market, the actual trade-off involved here is probably more favorable to consumers than you might think.

But therein lies the problem. The overall status of California’s real estate market is bleak, with sky-high home prices that far exceed the cost of constructing a new dwelling. Given those economics, California ought to be experiencing an enormous construction boom. Instead, it is adding houses at a very sluggish rate.

And since California is already one of the greenest places in the country, increasing the pace at which homes are built there so California could accommodate a larger share of the population would do more for the environment than any number of tweaks to the building code.

California is already very green

The state with the lowest carbon dioxide emissions per capita is New York, which contains by far the largest share of the population that commutes via mass transit. But as this chart from the Energy Information Agency shows, California is only very slightly behind New York, despite having a drastically higher per person car usage.

California is so green for two main reasons.

Its electricity mix is heavily tilted toward clean sources already. Second, the mild climate means Californians expend much less energy heating and cooling their homes than those of us with less blessed weather.

California isn’t growing as much as it could

The upshot is that if a person moves from Ohio or Missouri to California, their CO2 emissions fall by half or more. And it’s not as if moving from Missouri to the Golden State is a terrible deal in other ways. The median cashier earns about $1.90 an hour more in California, the median food service worker earns over $2 more, and an elementary school teacher earns a salary that’s nearly 50 percent higher.

Yet while California’s population is growing thanks to international immigration, among native-born Americans, more people leave the state each year than move in, despite the high wages and nice weather.

That’s because living in California is expensive, primarily because of very high house prices.

The solar panel mandate, according to house builders, will make that problem worse by adding to construction costs. But the reality is that the price of homes in California is already driven by land prices rather than construction costs. An increase in construction costs won’t necessarily make that much of a difference. The real question is why, given that homebuilding in California is so profitable, aren’t more homes getting built?

Florida is another warm-weather coastal state that’s already more densely populated than California, yet it’s adding more homes on a per capita basis than California despite having a significantly less vibrant economy.

The issue is that given the location of the oceans and mountains, California’s main cities don’t have much more space they can sprawl into.

To build more, allow more building

To add more homes, California would need to adopt something like the failed SB 827 proposal to rewrite local zoning codes and allow for denser construction in already-developed areas.

That would, obviously, annoy some people; long-settled homeowners generally don’t like change, and nobody likes increased traffic.

On the other hand, one assumes that California is imposing this solar panel mandate because California voters think climate change is a serious issue that policymakers ought to do something about. As it turns out, increasing the number of people who can move to California is a very effective way of fighting climate change. California’s per capita CO2 emissions are way below the national average. And if California became denser, its per capita emissions levels would fall even more since the state would begin to amass some of the green attributes of New York.

And while greater density would have some downsides, it would also lead to higher average wages and productivity while making it easier for the state to deliver on its pension obligations. If the state is serious about using housing policy as a lever to make progress on climate and energy issues, allowing more density is by far the most important thing it could do.