Issue Bug Closed

#63733Do not call recordInfo() for new records in DataHandler->checkValue

Stephan Großberndt 12/10/14, 12:11 updated 10/02/18, 11:48

Description

Currently DataHandler->checkValue calls

// Get current value:
$curValueRec = $this->recordInfo($table, $id, $field);
$curValue = $curValueRec[$field];

even for new records ($id = ‘NEW…’)

When bulk inserting 6500 records checking the id before calling recordInfo saves 5MB of RAM:

if (!(int)$id) {
    $curValue = NULL;
} else {
    // Get current value:
    $curValueRec = $this->recordInfo($table, $id, $field);
    $curValue = $curValueRec[$field];
}

Reviews 2