DEFAULT_SAVE_FREQUENCY
DEFAULT_SAVE_FREQUENCY
If not specified in the constructor, this will be the number of operations between saves
Memory efficient implementation of persistent arrays
The standard array objects in php and even spl have a large amount of overhead. The point of this class is to have the size as close to the optimal as possible
__construct(string $fname, integer $num_values, integer $data_size, integer $save_frequency = self::DEFAULT_SAVE_FREQUENCY)
Initiliazes the fields of the StringArray and its parent class PersistentStructure. Creates a null filled string array of size $this->string_array_size to stored data in.
string | $fname | the name of the file to store data persistently in |
integer | $num_values | the number of items the StringArray will store |
integer | $data_size | the size in bytes of a single item |
integer | $save_frequency | how often the StringArray should be stored to disk |