Autodesk-Forge / forge-api-java-client

Forge Java SDK: Provides Java SDK to help you easily integrate Forge REST APIs into the application
http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22forge-java-sdk%22
Apache License 2.0
38 stars 37 forks source link

Takes a long time to retrieve data (metadata and properties) using the client whereas direct server calls(using postman) takes only 11 seconds #49

Open udda89 opened 3 years ago

udda89 commented 3 years ago

I have a couple of IFC files which are around 80MB each

I tried using both US and EMEA services(Data Management and Model Derivative) but what I experience is to retrieve metadata and properties it takes a huge amount of time. Whereas I tested the same server calls (on EMEA) using postman and it took only 11 seconds.

Any advice on this matter ?

xiaodongliang commented 3 years ago

@udda89 , same to Postman, JAVA SDK calls raw web services of Forge. The packaged methods do nothing special that would affect performance. Did you test with the sample scripts two_legged_bucket_translation_metadata.java ?

In addition, I am not sure the test scenario, while GET Metadata will not return 200 until the metadata & properties are extracted successfully. When it is not ready, it will return 202. Might it be possible when you tested with Postman, the previous GET metadata has been completed? Did you test with same IFC in JAVA SDK and Postman?

Note: in two_legged_bucket_translation_metadata.java, the second param of derivativesApi.translate is true (xAdsForce = true), which means it always post a new translation to translate the model again. So when GET:Metadata afterward, it will launch a new extraction. If your Postman does not set xAdsForce, it will not translate the original model again, and when GET:metadata, it will reuse the previous result.

anyway, just some analysis on top of my head. If you still have the issue, please contact forge.help@autodesk.com