Please see Enhancement Request 20988OSI8 - Implement a RowCount option for GetPoints. There are a few options I see:
1. Use GetPoints asynchronously. This allows to cancel the operation when it takes too long.
a) Offer a control to users that allows them to cancel long running queries
b) Use a timer and cancel the query when the OnTimer event occurs
2. Use the Tag Search dialog that comes with PI SDK. It operates asynchronously and offers a cancel button.
3. Do some basic checks on the WhereClause before executing GetPoints to avoid common user errors.
4. A common way to group tags is the Point source. Depending on the point sources used in your PI System, you may be able to create a list of "valid" point sources and break the users query into several queries that use the list of "valid" point sources.
5. Set the timeout of your connection to e.g. 10 seconds before executing GetPoints and set it back to its previous (default) afterwards.