Interface PerformanceInterface

The PerformanceInterface interface is used to control the resources allocated to the renderer, be it cache, maximum number of displayed triangles and memory consumption.

A physical cache (based on IndexedDB) is used to store build infos (used to initialize the renderer), and a second cache to store HD geometries. Changing values for the performance object stores the new parameters in the localStorage of the browser, thus allowing the user to set specific information for its hardware.

The maximum amount of GPU memory consumption (VRAM) for geometries, the working memory (used when simultaneously downloading geometries), the maximum amount of displayed triangles and the quality (in term of number of triangles) of the dynamic low definition of the DMU can also be set.

These values should reflect the "quality" of the hardware the API runs on. Please refer to the InfiniteEngineInterface for more precisions.

/** 
* Sample to illustrate setting some performance settings of the InfiniteEngineInterface
* by using the PerformanceInterface.
*/
import { MetadataManagerInterface, PerformanceInterface } from 'generated/documentation/appinfiniteapi';

// created previously
let lMetadataManager : MetadataManagerInterface;
// get the performance interface
const lPerformanceInfos : PerformanceInterface = lMetadataManager.getPerformanceInfos();

// reset the number of triangles to display in the dynamic low definition DMU
lPerformanceInfos.setMaxNbDynamicLowDefTrianglesDisplayed(lPerformanceInfos.GetMaxDynamicLowDefTrianglesDefault());
// reset the number of total triangles to be displayed
lPerformanceInfos.setMaxNbTrianglesDisplayed(lPerformanceInfos.GetMaxTrianglesDefault());
// reset the VRAM (RAM on the GPU) amount to be used
lPerformanceInfos.setMaxRenderingMemory(lPerformanceInfos.GetMaxRenderingMemoryDefault());
// reset the RAM to use when downloading data (if geometries are too big, less geometries will be downloaded at the same time)
lPerformanceInfos.setMaxWorkingMemory(lPerformanceInfos.GetMaxWorkingMemoryDefault());

.
3D Rendering

See

InfiniteEngineInterface

Hierarchy

  • PerformanceInterface

Methods

  • Gets the default (initialization) maximum amount of disk usage used to store build data in the cache (in bytes).

    This value is a constant, arbitrary set by the library 4 GB.

    Returns

    The default maximum number of bytes used to store build data.

    Returns number

  • Gets the minimal amount of disk usage used to store build data in the cache that can be set by setMaxBuildCacheSize (in bytes).

    This value is a constant, arbitrary set by the library 128 MB.

    Returns

    The minimum value that can be set by setMaxBuildCacheSize.

    See

    setMaxBuildCacheSize

    Returns number

  • Gets the default (initialization) maximum number of displayed triangles for the dynamic low definition model.

    This value is a constant, arbitrary set by the library 1 000 000.

    Returns

    The default maximum number of displayed triangles for the dynamic low definition model.

    Returns number

  • Gets the default (initialization) maximum amount of disk usage used to store high definition geometries in the cache (in bytes).

    This value is a constant, arbitrary set by the library 4 GB.

    Returns

    The default maximum number of bytes used to store HD geometries.

    Returns number

  • Gets the minimal amount of disk usage used to store high definition geometries in the cache that can be set by setMaxGeometryCacheSize (in bytes).

    This value is a constant, arbitrary set by the library 128 MB.

    Returns

    The minimum value that can be set by setMaxGeometryCacheSize.

    See

    setMaxGeometryCacheSize

    Returns number

  • Gets the default (initialization) maximum amount of memory used to render high definition geometries (in bytes).

    This value is a constant, arbitrary set by the library 2 GB.

    Returns

    The default maximum number of bytes used to render HD geometries.

    Returns number

  • Gets the minimal amount of memory used to render high definition geometries that can be set by setMaxRenderingMemory(in bytes).

    This value is a constant, arbitrary set by the library 512 MB.

    Returns

    The minimum value that can be set by setMaxRenderingMemory.

    See

    setMaxRenderingMemory

    Returns number

  • Gets the default (initialization) maximum number of displayed triangles.

    This value is a constant, arbitrary set by the library 10 000 000.

    Returns

    The default maximum number of displayed triangles.

    Returns number

  • Gets the default (initialization) maximum amount of memory allocated to process the parallel downloading of high definition geometries (in bytes).

    This value is a constant, arbitrary set by the library 256 MB.

    Returns

    The default maximum number of working bytes.

    Returns number

  • Gets the minimal amount of memory allocated to process the parallel downloading of high definition geometries that can be set by setMaxWorkingMemory (in bytes).

    This value is a constant, arbitrary set by the library 128 MB.

    Returns

    The minimum value that can be set by setMaxWorkingMemory.

    See

    setMaxWorkingMemory

    Returns number

  • Gets the current amount of disk usage used to store build data in the cache (in bytes).

    Caching such data helps starting the application much faster. This value is shared between all the builds that may have been opened by the user.

    Returns

    The current number of bytes used to cache build information.

    Returns number

  • Gets the current amount of disk usage used to store high definition geometries in the cache (in bytes).

    Caching such data helps lowering the bandwidth usage. This value is shared between all the projects that may have been opened by the user.

    Returns

    The current number of bytes used to cache HD geometries.

    Returns number

  • Gets the current number of displayed triangles.

    Returns

    The number of displayed triangles.

    Returns number

  • Gets the current amount of memory used to render high definition geometries (in bytes).

    Returns

    The current number of bytes used to render HD geometries.

    Returns number

  • Gets the current amount of memory allocated to process the parallel downloading of high definition geometries (in bytes).

    This parameter is highly optional, you should not need to change anything in most circumstances.

    Returns

    The current number of working bytes.

    Returns number

  • Gets the maximum amount of disk usage used to store build data in the cache (in bytes).

    Caching such data helps starting the application much faster. This value is shared between all the builds that may have been opened by the user.

    This value defaults to 4 GB.

    Returns

    The maximum number of bytes used to cache build information.

    Returns number

  • Gets the maximum amount of disk usage used to store high definition geometries in the cache (in bytes).

    Caching such data helps lowering the bandwidth usage. This value is shared between all the projects that may have been opened by the user.

    This value defaults to 4 GB.

    Returns

    The maximum number of bytes used to cache HD geometries.

    See

    GetMaxGeometryCacheSizeDefault

    Returns number

  • Gets the maximum number of displayed triangles for the dynamic low definition model.

    This value defaults to 1 000 000.

    Returns

    The maximum number of displayed triangles for the dynamic low definition model.

    See

    GetMaxDynamicLowDefTrianglesDefault

    Returns number

  • Gets the maximum number of displayed triangles.

    No more than getMaxNbTrianglesDisplayed triangles will be displayed.

    This value defaults to 10 000 000.

    Returns

    The maximum number of displayed triangles.

    See

    GetMaxTrianglesDefault

    Returns number

  • Gets the maximum amount of memory used to render high definition geometries (in bytes).

    At most getMaxRenderingMemory bytes will be used by the graphic card to render HD geometries. Such a budget should be a little less than the VRAM of the graphic card of the end-user.

    This value defaults to 2 GB.

    Returns

    The maximum number of dedicated bytes to render HD geometries.

    See

    GetMaxRenderingMemoryDefault

    Returns number

  • Gets the maximum amount of memory allocated to process the parallel downloading of high definition geometries (in bytes).

    This parameter is highly optional, you should not need to change anything in most circumstances.

    This value defaults to 256 MB.

    Returns

    The maximum number of working bytes.

    See

    GetMaxWorkingMemoryDefault

    Returns number

  • Tells if the frame buffer objects status should be tested (debug troubleshooting).

    This value is set to false by default. The frame buffer status check procedure slows the rendering pipe with the first frame and when the window is resized. Such a value is not stored in the localStorage of the browser.

    Returns

    true if the frame buffer objects status will be checked.

    Returns boolean

  • Tells if the shaders compilation check is done (debug troubleshooting).

    This value is set to false by default. The shader compilation check procedure slows the rendering pipe with the first frame and when the window is resized. Such a value is not stored in the localStorage of the browser.

    Returns

    true if the shader compilation result is checked.

    Returns boolean

  • Sets if the frame buffer objects status should be tested (debug troubleshooting).

    This value is set to false by default. The frame buffer status check procedure slows the rendering pipe with the first frame and when the window is resized. Such a value is not stored in the localStorage of the browser.

    Parameters

    • pCheckStatus: boolean
      in
      If set to true, the frame buffer objects status will be checked.

    Returns void

  • Sets the maximum amount of disk usage used to store build data in the cache (in bytes).

    Caching such data helps starting the application much faster. This value is shared between all the builds that may have been opened by the user.

    This value defaults to 4 GB.

    Returns

    true if the value is superior to GetMaxBuildCacheSizeMin.

    See

    GetMaxBuildCacheSizeMin

    Parameters

    • pMaxNbBytes: number
      in
      The new maximum number of bytes used to cache build information.

    Returns boolean

  • Sets the maximum amount of disk usage used to store high definition geometries in the cache (in bytes).

    Caching such data helps lowering the bandwidth usage. This value is shared between all the projects that may have been opened by the user.

    This value defaults to 4 GB.

    Returns

    true if the value is superior to GetMaxGeometryCacheSizeMin.

    See

    GetMaxGeometryCacheSizeMin

    Parameters

    • pMaxNbBytes: number
      in
      The new maximum number of bytes used to cache HD geometries.

    Returns boolean

  • Sets the maximum number of displayed triangles for the dynamic low definition model.

    This value defaults to 1 000 000.

    Returns

    true if the value is greater than GetMaxDynamicLowDefTrianglesMin.

    See

    GetMaxDynamicLowDefTrianglesMin

    Parameters

    • pNbMaxTriangles: number
      in
      The new maximum number of triangles displayed for the dynamic low definition model.

    Returns boolean

  • Sets the maximum number of displayed triangles.

    This value defaults to 10 000 000.

    Returns

    true if the value greater than GetMaxTrianglesMin.

    See

    GetMaxTrianglesMin

    Parameters

    • pNbMaxTriangles: number
      in
      The new maximum number of displayed triangles.

    Returns boolean

  • Sets the maximum amount of memory used to render high definition geometries (in bytes).

    At most getMaxRenderingMemory bytes will be used by the graphic card to render HD geometries. Such a budget should be a little less than the VRAM of the graphic card of the end-user.

    This value defaults to 2 GB.

    Returns

    true if the value is greater than GetMaxRenderingMemoryMin.

    See

    GetMaxRenderingMemoryMin

    Parameters

    • pMaxNbBytes: number
      in
      The maximum number of dedicated bytes to render HD geometries.

    Returns boolean

  • Sets the maximum amount of memory allocated to process the parallel downloading of high definition geometries (in bytes).

    This parameter is highly optional, you should not need to change anything in most circumstances.

    This value defaults to 256 MB.

    Returns

    true if the value is greater than GetMaxWorkingMemoryMin.

    See

    GetMaxWorkingMemoryMin

    Parameters

    • pMaxNbBytes: number
      in
      The maximum number of dedicated bytes to render HD geometries.

    Returns boolean

  • Sets if the shaders compilation check should be done (debug troubleshooting).

    This value is set to false by default. The shader compilation check procedure slows the rendering pipe with the first frame and when the window is resized. Turning this value to false increases performance. Such a value is not stored in the localStorage of the browser.

    Parameters

    • pCheckCompilation: boolean
      in
      If set to true, the shader compilation result will be checked.

    Returns void