This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Increase/Decrease number of pre-allocated rows when loading CSV file during <cCSV>.Load operations.
Syntax
'---SET
<cCSV>.Rows.Buffer = nRows
'---GET
nRows = <cCSV>.Rows.Buffer
Returns
Number, number of pre-allocated rows.
Remarks
Default rows buffer is 500 rows. It means that every 500 rows, internal data matrix will be reallocated in memory.
Reallocation is very high cpu/memory consumption operation so having the correct pre-allocated number of rows is important.
For CSV files with high number of columns (lets say more than 100) and relatively low number of rows (less than 100k), please decrease this parameter.
For CSV files with low number of columns (less then 100) and high number of rows (up to milions), please increase this parameter in order to reduce number of times internal matrix will be relocated in memory
Restrictions
You need to set buffer before a call to <cCSV>.Load.
Minimum number of rows is 100.
Maximum number of rows is 10000.
See also
Examples
uses "CSV", "console"
dim data as new cCSV
data.Row.Buffer = 1000
data.Load(APP_ScriptPath + "big.csv", True) ' Change to existing CSV file
printl $("Number of rows found: {data.Rows}")
waitkey