Some Christians think that praying endlessly for people who show no sign of repentance and belief is like casting pearls before swine. But that expression may be more applicable to preaching or evangelizing than to prayer (Matt. 7:6). Don’t wear your tongue out preaching to your willfully hardened loved one—but prayer is something else. The text warning us not to cast pearls before swine is followed by an exhortation to pray.
The apostle Paul said that his heart’s desire and prayer to God was that others might be saved (Rom. 10:1). Maybe he was encouraged to do so by his own inspired words in 1 Timothy 2:3–8, and by Peter’s words in 2 Peter 3:9. Look them up and read them.