Oy, performance hog alert!
Portal filtering can be expensive because all the data has to be sent to the client to decide whether or not to show it in the portal. Adding a summary field to the mix is just asking for performance issues.
The summary field can easily be avoided by calculating and setting the running balance when a new invoice / payment is added. That avoids having to recalculate that balance over and over again.
To avoid the portal, can you re-work the UI so that you can show the data in a list instead of a portal? That way you can do a straightforward find.