msgraph-sdk-python icon indicating copy to clipboard operation
msgraph-sdk-python copied to clipboard

Improve execution time on Model deserialization

Open bfuia opened this issue 1 year ago • 0 comments

So I tried to migrate our usage of raw API calls to Microsoft Graph to your new release 1.1.0. And I measured execution time with the bare-bones method time.time() before method call, time.time() after method call.

I've tried performing get requests for the endpoints: me, users, domains.

The results were that the sdk is on average 3.5 times slower than the raw call to API which I think a great deal.

Furthermore, I was curios where this overhead came from and I searched through the code with debug. And the most time spent in execution is after the call to the rest api, when the sdk is building a model by deserializing the json object got from the request in a sdk specific object.

This execution time difference lead me to decide that I should postpone the migration until this is improved or fixed.

bfuia avatar Feb 09 '24 09:02 bfuia