DataBasic Reference > Programming in DataBasic > Efficiency Guidelines > File Input and Output

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

File Input and Output (DataBasic) (m618705+egfileio.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

File Input and Output

File I/O (READ and WRITE statements and their variants) may have an effect on the efficiency of a DataBasic program. Internally these statements have to:

READV

READV should only be used when only a few attributes are required from a large item and they are not to be written back using WRITEV. In other cases it is more efficient to read the whole item.

WRITEV

This instruction has to read the whole item into DataBasic workspace, replace the relevant attribute, and then write the item back. Therefore if more than one attribute is to be written, it is more efficient to not use WRITEV so that the item is only written once.

MATREAD and MATWRITE

As MATREAD and MATWRITE have to convert between dynamic and dimensioned arrays they take longer to execute, and therefore should only be used where they provide some other benefit to performance (see topic Dynamic Arrays.).

READV of Attribute 0

A READV of attribute 0 allows the existence of an item to be checked without actually reading the item. This is especially useful when accessing items in remote files as no data needs to be copied over the network.

RealityV15.0Comment on this topic