It took GuiYing Ma a few months to die after Elisaul Perez pounded her head in with a rock. The North Corona grandmother was in an induced coma for 10 weeks and was kept alive with a ventilator and a feeding tube. A couple weeks after she woke up she started moving a little, giving her family hope, but the next day she died, aged 61.

If only Perez hadn’t come along and pounded her with that rock the day after Thanksgiving 2021, she’d be alive today. She’s one of the few immigrants you actually could say would have been better off had she stayed in China.

This week Perez was sentenced to 20 years in prison, after pleading guilty to manslaughter. He’ll get out when he’s 54 — if he serves his full sentence. He should have been charged with murder and given no plea deal. He had nothing to offer prosecutors. There was no bigger fish to catch. Perez is just a deranged killer who deserved to get 25 years to life.

Yet prosecutors love to cut deals, and those in the Queens District Attorney’s Office are no exception. It takes a lot of work to go to trial. And these days especially, as prosecutors labor under the new discovery laws Albany imposed on them three years ago, forcing them to turn over evidence much earlier than before, among other measures tilting the scales of justice more toward defendants, there just may not be enough people to get the job done.

So among the most promising of the criminal-justice improvements Gov. Hochul offered in her State of the State address Tuesday was her proposal to hire “hundreds” of prosecutors around the state, by “more than tripling” the $12 million the state’s Aid to Prosecution program provides. The move, she said, will reduce case backlogs back to where they were before the Covid pandemic — which, one might note, hit around the same time as the new laws, early 2020.

Also vital is revisiting the insane bail “reform” laws that went into effect at the same time, and Hochul said she will do that, at least to a degree. Judges need clarification on Albany’s order to impose the “least restrictive” means necessary to get defendants to return to court, she said. They probably need more than that — specifically the return of more crimes to the list that are eligible for bail and the ability to order people held based on the danger they pose — but we’ll soon see exactly what Hochul proposes.

She also vowed more money for mental health services and substance abuse treatment and more state police, all worthy ideas. She also would fund 1,000 new in-patient psychiatric beds in hospitals around the state, with at least 100 slated for New York City, though 850 of them would just make up for ones that were lost during the pandemic. Still, they could help in the fight against crime, and can’t hurt.

And that fight against crime must go on. Although we’re finally seeing reductions in murder and shootings, other major offenses are still way up, leaving the total number of the seven so-called index crimes 22 percent higher in 2022 than it was the year before. And even that marks an improvement — early last year the city was on track to see a 45 percent increase in those seven crimes from 2021.

Much of the credit for the reduction in shootings, and therefore murder, doubtlessly can go to the NYPD’ neighborhood safety teams, the sort-of-plainclothes units Mayor Adams deployed to replace the anticrime units his predecessor had disbanded. These men and women are the front lines of gun control. Overall, city cops seized 7,135 guns last year.

If Hochul is as serious as Adams about crime, and can get enough lawmakers to see things her way — no easy task — we might make progress toward getting crime where it was a few short years ago. Otherwise, we can expect even more cases like that of tragic GuiYing Ma, who suffered so much.