Hi:
What version of InfoPath and SharePoint are you using? I think with 2010, SharePoint list connections have query fields... that would allow you to populate a query field before running the query.
Is it the loading of the data or the displaying of the data on the form that is causing your slow load time? You could try opening the form to a blank view but still load data on open to check that. If it is the display of the data on your form that is slowing you down, you could add filters to the table that shows the data.
If you are using an earlier version of SharePoint / IP, you may need to look into using an owssvr.dll data connection. They allow filtering, either via code or you can use qRules and save yourself the bother of writing and maintaining code.