GetComponents is the best way for get an Array of Components?

Hallo,

I use GetComponets to retrieve the array of components in an assembly, and then make use that I need, but overall it is very very slow:

This is my code in Visual Basic 2010, in stand alone metod

swApp = CreateObject("SldWorks.Application")

swModel = swApp.ActiveDoc

Part = swModel

Dim i As Integer

comps = Part.GetComponents(False)

For i = 0 To UBound(comps)

comp = comps(i)

   If comp.IsRoot Then 

   Else

  End If

Next

Is there a faster way to get my array of components?

Thank you

SolidworksApi macros