Improving performance

Caching improves performance by storing data in memory. This allows you to read and write multiple keys while only accessing the file once, significantly improving performance when files contain many keys.

Creating a file in the cache

You can create a file in cache by simply setting the storage location to ES3.Location.Cache:

Storing a cached file to a local file

You can store a file in the cache to a permanent local file using ES3.StoreCachedFile.

Loading an existing file into the cache

You can load an existing file into the cache using ES3.CacheFile. You can then read data from this cached file by settings the storage location to cache:

The ES3.CacheFile method can also accept a filePath if you wish to cache a specific file rather than the default file:

When your scene contains an Easy Save 3 Manager, by default Easy Save automatically gathers objects in your scene and adds them to the manager so that they can be assigned a reference ID (see Saving and Loading References).

Sometimes the reference manager can contain references to objects which are no longer referenced by your scene. In this case you can press the Optimize button on the ES3ReferenceMgr Component of the Easy Save 3 Manager in your scene.

If you have dense scenes with a large number of dependencies (>100,000), some memory savings can be had by manually managing references to ensure that only references which are used are in the reference manager. See the Manually managing references section below for more information on this.

Manually managing references

When your scene contains an Easy Save 3 Manager, by default Easy Save automatically gathers objects in your scene and adds them to the manager so that they can be assigned a reference ID (see Saving and Loading References).

In larger scenes and projects this can become performance intensive. If you find the Editor is slowing down it’s recommended to manually manage references instead by doing the following:

  1. Go to Tools > Easy Save 3 > Settings.
  2. Uncheck Auto Update References in the Editor Settings section.

Now to add an object and it’s dependencies to the reference manager, you can right-click it and select Easy Save 3 > Add Reference(s) to Manager.

If your project hasn’t yet been released you might also want to consider deleting any Easy Save 3 Managers from your scene and re-adding them to remove any existing references. Note that this will invalidate any existing save data which uses those reference IDs, so you will also need to delete your save data.