DataManagement.expandGRMRelationsForSecondary is only one of many CAD service APIs used by the Solidworks integration to get information from Teamcenter. Generally speaking, it is used to traverse from the secondary object in a relation to the primary. A common application is to locate all family table configurations belonging to a given master document. Reverse lookups in Teamcenter do tend to be expensive, and any underlying database issues will only exacerbate the performance problems.
I recommend you run index_verifier on your Teamcenter server, followed by client & server performance journalling. You can open an IR with GTAC to upload your log files, and we will then analyze them to determine where the bottleneck lies.