Training
Module
Optimize app load time - Training
Learn how you can evaluate and improve app load times. By regularly reviewing and measuring your app, you can proactively identify and remediate startup performance problems.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
With TurboLoading, you can load your entire inventory with a single request to the GetInventoryItems
API. This improves your startup latency and performance, as you don't have to make multiple calls to load all the items from your inventory collection. For billing purposes, every 250 items is treated as a single page, so your costs should not change.
TurboLoading is currently available for all titles using the Economy V2 REST API. The PlayFab Services C# and Unity SDKs have further support for compression, including transparently handling decompression for you. To activate TurboLoading, you need to:
Count
parameter of the GetInventoryItems
API to more than 250 items. You can set it up to the maximum size of an inventory collection, which is 10,000 items.Accept-Encoding: gzip
header in your request.gzip
before you can use the inventory data.For example, if you want to load your entire inventory of 700 items, you can make a single call to the GetInventoryItems
API with a count of 700 and the Accept-Encoding: gzip
header. You get a compressed response with all your inventory items. You need to decompress the response using gzip before you can use the data.
You can set compression (and automatic decompression) of all API responses using the PlayFab Services C# and Unity SDKs, as follows:
PlayFabSettings.staticSettings.CompressResponses = true;
Or you can set compression only for your Economy API instance, as follows:
var economyApi = new PlayFabEconomyInstanceAPI(new PlayFabApiSettings { CompressResponses = true }, authContext);
You can enable compression for all API responses using the Cross-Platform PlayFabCSDK with PFHttpSettings as follows:
// Initialize PFHttpSettings struct
PFHttpSettings* httpSettings = new PFHttpSettings;
// Enable Repsonse Compression (and automatic decompression)
httpSettings->requestResponseCompression = true;
// Set PFHttpSettings
HRESULT hr = PFSetHttpSettings(httpSettings); // Add your own error handling FAILED(hr) == true
Additionally you can disable compression for all API reponses:
// Disable Response Compression
httpSettings->requestResponseCompression = false;
// Update PFHttpSettings
hr = PFSetHttpSettings(httpSettings); // Add your own error handling
TurboLoading is billed per returned page, meaning the total number of items being returned divided by 250 (rounded up). You pay the same as if you're loading 250 items per page. For example, if you load 700 items, with TurboLoading, you get billed for 3 requests (700 / 250 = 2.8, rounded up to 3).
TurboLoading offers several benefits, such as:
Training
Module
Optimize app load time - Training
Learn how you can evaluate and improve app load times. By regularly reviewing and measuring your app, you can proactively identify and remediate startup performance problems.
Documentation
Document detailing the various limits surrounding Economy V2.
Catalogs (Legacy Economy) - PlayFab
Describes the Catalogs tab in the (Legacy) Economy section in Game Manager and the Catalog item type.
PlayFab Inventory APIs - PlayFab
Overview of the PlayFab Inventory APIs
PlayFab Engagement Overview - PlayFab
Learn about an overview of PlayFab features. PlayFab Engagement is a set of tools to engage your player community and keeping them coming back for more.