getComponents call is really slow
2 2

8 posts in this topic

Hello,

 

For the most part we really love the asset management api.  However, we are finding with large amount of assets(with multiple components) calling getComponents is proving to be crazy slow.  For instance we have a render asset with 36 aov components.  When we debug we notice it makes 248 calls to the server which seems unnecessary.  We noticed this really only happens with getComponents.  Ideally it would work similarly to getAssets which makes one call and returns the FTlist or maybe a dictionary. 

 

If there is possibly a better work around for this that we are missing would love to know your thoughts.

 

Thanks

JV

Share this post


Link to post
Share on other sites

Hi Jonathan,

 

yes, getComponents seems to do very unnecessary calls to the server. I will talk with the developers tomorrow to see what's going on and update this topic as soon as I know more. Sorry for the inconvenience.

 

Thanks,

Fredrik

Share this post


Link to post
Share on other sites

Hi Jonathan,

 

Thanks for the report.

 

This issue stems from us trying to automatically bind an instantiated Component to a Location on retrieval for backwards compatibility. From a brief look at the code I can see a couple of ways to optimise this and also that we should give you the option to avoid the automatic location lookup when calling getComponents.

 

We will tackle this in our next sprint that starts next week.

 

cheers,

 

 

Martin

Share this post


Link to post
Share on other sites

Hey all,

 

Just to let you know that the performance improvement for getComponents is included in the new 2.6v4 release (http://support.ftrack.com/customer/portal/articles/1556180-2-6). You will also need to download a fresh copy of the API from your upgraded server.

 

The time taken should now be significantly lower per getComponents call and only a few queries issued to the backend. Please let us know how it performs for you after upgrading.

 

cheers,

 

 

Martin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
2 2