Porfiry is the attorney investigating the murders of Alyona and Lizaveta, and is a bit of a mystery. We don't really know him outside of his professional capacity. He's related to Razumihin, but that doesn't give us much to go on as far as his character is concerned. Like most people in the novel, he seems to really like Raskolnikov and wants to see him get better. He isn't immediately convinced of Raskolnikov's guilt either.
When he is sure, he probably has enough "evidence" to successfully arrest Raskolnikov, but he doesn't. It seems he's more interested in Raskolnikov's potential rehabilitation than in "winning" what often seems like a wicked game. That is, in his eyes, true "justice" can only be done if Raskolnikov confesses, if Raskolnikov voluntarily turns himself over to the system. In that sense, we have a positive representation of the judicial system, where the agent of justice works hard behind the scenes to urge the criminal into a position where he or she can more easily find possible redemption.
Of course, one might argue that Porfiry is soft and took a needless risk on Raskolnikov. What if he had killed again, or killed himself, or hurt someone after Porfiry knew he was the killer, but before he confessed? It didn't happen that way, but it could have. Would this change the way we feel about Porfiry?