Portia is scary. And she's scary in two possible ways.
One: she knows the law and Shylock so well that there is never any danger to Antonio. That's a good kind of scary. She's scary good at her job.
Two: she knows that she is going to win no matter what and instead of getting it done quickly, she enjoys taunting Shylock's vengeance and scaring the tar out of Antonio and Bassiano. If that's the truth, that's just mean.
Either way, it's clear that Portia knows how to operate in a court setting. Throughout the trial, Shylock is pushing hard for justice to be served. He made a deal with Antonio, and he wants to see that deal honored. He wants it followed exactly . . . to the letter. Portia attempts to get Shylock to give mercy. No success. Then she gives him the opportunity to take much more financial payment than he originally was supposed to get back. No go there either. The entire time Shylock's responses were more or less "that wasn't the deal."
It's like Portia is just reeling Shylock in, so that she can sucker punch him with a letter of law punishment. Shylock's deal with Antonio called for "a pound of flesh." Right as Shylock was about to take that pound of flesh, Portia reminded him that the deal called for a pound of flesh, but no blood. Shylock doesn't see the significance. Portia informs him that under the letter of Venice law, if Shylock spills any Christian blood, all of his property and holdings will be confiscated by the state. Shylock can hardly believe it, but quickly backpedals and tries to take the money deal again. Portia informs Shylock that is no longer possible because he already turned it down in court. Portia then informs Shylock of another Venetian law that will now punish Shylock for seeking the life of a Venetian citizen. Basically Shylock has to give up a lot of his money to Antonio and the state. Not all of it, but a lot.
Portia's good, very good. She has the entire court proceedings in hand AND is able to use the very thing that Shylock was pushing for (justice and law) against him.