DALLAS—As Texas Gov. Rick Perry ponders a bid for the Republican presidential nomination, Texans weighing his economic legacy are debating the role played by a long boom in government jobs—and the possible bust ahead.

Texas has enjoyed the most robust economy in the U.S. during Mr. Perry's decade as governor, which is one reason his potential candidacy is attracting national attention. The Lone Star State gained more than a million jobs since the end of 2000, while the U.S. has lost almost 1.5 million, according data from the Bureau of Labor Statistics.

About 300,000 of the new Texas jobs were in government. Well over half of them, fueled by the surging population, were at public schools. Employment in the state's public sector has jumped 19% since 2000, compared with a 9% rise in the private sector.

Now layoffs loom. State budget cuts, championed by Mr. Perry to address a big budget shortfall, are prompting school districts around the state to lay off hundreds of teachers and other workers going into the school year starting next month.

The layoffs haven't shown up in federal data, but some economists forecast they may damp the state's vaunted economic growth. And many more jobs are likely to disappear over the next two years as a result of about $15 billion in state budget cuts.