Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter EighteenDataView Integration (continued)

DataViewPreallocate Function

Overview

The DataViewPreallocate function allows the caller for preallocate various memory areas within the underlying Data Sheet to improve import or insert performance.

Syntax/Parameters

Syntax

int = DataViewPreallocate ( handle object, int pool, [int cells],
                        [int rows], [int cols]));

Parameters

object

A handle either to a Data View Object or to a window that employs Data View.

pool

An int specifying an amount of bytes to increase the size of the data string pool. If the incoming data will be string heavy, use this value to force more space to be allocated. To not adjust the size, set the value to zero (0).

cells

An optional int specifying an amount of records to increase the cell data array. If the incoming data will be cell heavy, use this value to force more space to be allocated. A rule of thumb is to multiply the number of expected cells by the the number of expected rows. To not adjust the size, set the value to zero (0).

rows

An optional int specifying an amount of row to increase the row array. If the incoming data will be row heavy, use this value to force more space to be allocated. To not adjust the size, set the value to zero (0).

cols

An optional int specifying an amount of columns to increase the column array. If the incoming data will be column heavy, use this value to force more space to be allocated. To not adjust the size, set the value to zero (0).

Return Value

An int as ERROR_NONE or a formatted error code on failure. Use the GetLastError function to determine the nature of the error.

Remarks

This function is useful to improve performance when the number of cells starts to grow in excess of 100,000. Overallocating has the adverse effect of simply wasting memory.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL