Even cities with understaffed police departments have made record gains.