We have some players playing one of our games for almost a year now. Recently these players started experiencing troubles. After a little investigation it looks like we get a CloudScriptExecutionTimeLimitExceeded for one of our cloud script API methods. The method in question does not do very much, but at the end of the method we query the UserInventory. All users affected by this timeout have only a few active user inventory items (between 20 and 30) but more than 6000 expired items (this were time limited offers, time limited items, rewards, etc...).
So our question is, should revoked/expired items really increase the GetUserInventory time? And if so, how to work around this or clear the history of expired items?
TitleID: 4D83
PlayerID: 9139B32C3D42936E
Method: StartEvent