They almost destroyed me on earth, But as for me, I did not forsake Your precepts.
NASB95
They have almost made an end of me on earth, but I have not forsaken your precepts.
ESV
They had almost consumed me upon earth; but I forsook not thy precepts.
KJV

And why did they not quite consume him? Because "the eyes of the Lord run to and fro throughout the whole earth, to show Himself strong in behalf of them, whose heart is perfect toward Him." "Surely the wrath of man shall praise You; the remainder of wrath shall You restrain." And why have not our spiritual enemies consumed us upon earth? "Satan has desired to have us, that he may sift us as wheat." But—says the Savior, "I have prayed for you, that your faith fail not." "My sheep shall never perish; neither shall any pluck them out of My hand." Steadfastness of profession is the evidence of the life of faith: grounded upon this security, the more we are shaken, the more we shall hold fast. Neither long-continued distress, nor determined opposition, will turn us from the ways of God. We would rather forsake all that our heart held dear upon earth, than the precepts of our God. With whatever intensity of affection we love father and mother (and the influence of the Gospel has increased the sensibilities of relative affection), we remember who has said, "He who loves father and mother more than Me, is not worthy of Me." Unlike the deluded professor, we have counted the cost of the "tribulation and persecution" of the Gospel; and the result has only served to confirm our love and adherence to our heavenly Master. Shall not we find in heaven—no, do not we find in the gospel—a far better portion than we lose?

When, therefore, we are tempted to neglect the precepts, or when we fail to live in them, and to delight in them, let us each bring our hearts to this test: 'What would I take in exchange for them? Will the good-will and approbation of the world compensate for the loss of the favor of God? Could I be content to forego my greatest comforts, to "suffer the loss of all things," yes, of life itself, rather than forsake one of the ways of God? When I meet with such precepts as link me to the daily cross, can I throw myself with simple dependence upon that Savior, who has engaged to supply strength for what He has commanded?' How often in times of spiritual temptation, if not of temporal danger, they had almost consumed us upon earth! but "in the mount" of difficulty "the Lord has been seen." Oh! let each of us mark our road to Zion with multiplied Ebenezers, inscribed Jehovah-jireh, Jehovah-nissi. "By this I know You favor me, because my enemy does not triumph over me. And as for me, You uphold me in my integrity, and set me before Your face forever."

What a fine testimony of the upholding grace of God! How could a helpless believer stand against such an appalling array? Yet it is a great, but a true word, suitable for a babe in Christ, as well as for an Apostle, "I can do all things through Christ that strengthens me." Yes, I can "wrestle even against principalities and powers" of darkness, if I be "strong in the Lord, and in the power of His might."

"They had almost consumed me upon earth." His foes had almost destroyed him so as to make him altogether fail. If they could they would have eaten him, or burned him alive; anything so that they could have made a full end of the good man. Evidently he had fallen under their power to a large extent, and they had so used that power that he was well-near consumed. He was almost gone from off the earth; but almost is not altogether, and so he escaped by the skin of his teeth. The lions are chained: they can rage no further than our God permits. The Psalmist perceives the limit of their power: they could at the utmost only consume him "upon the earth:" they could touch his earthly life and earthly goods. Upon earth they almost ate him up, but he had an eternal portion which they could not even nibble at.

"But I forsook not your precepts." Neither fear, nor pain, nor loss, could make David turn out of the plain way of God's command. Nothing could drive him from obeying the Lord. If we stick to the precepts we shall be rescued by the promises. If ill-usage could have driven the oppressed saint from the way of right, the purpose of the wicked would have been answered, and we should have heard no more of David: but through divine grace he was not overcome of evil. If we are resolved to die sooner than forsake the Lord, we may depend upon it that we shall not die, but shall live to see the overthrow of them that hate us.