improve performance on importer repository oaipmh

This commit is contained in:
Eduardo Humberto 2019-02-28 20:40:33 -03:00
parent da91601ba4
commit bb27a20b47
1 changed files with 4 additions and 2 deletions

View File

@ -76,9 +76,9 @@ class Oaipmh_Importer extends Importer {
} }
if( $xml->ListRecords ){ if( $xml->ListRecords ){
$size = count($xml->ListRecords->record); // verifico o tamanho dos list record para o for $j = 0;
for ($j = 0; $j < $size; $j++) { while ( isset($xml->ListRecords->record[$j]) ) {
$record = $record = $xml->ListRecords->record[$j]; $record = $record = $xml->ListRecords->record[$j];
$dc = $record->metadata->children("http://www.openarchives.org/OAI/2.0/oai_dc/"); $dc = $record->metadata->children("http://www.openarchives.org/OAI/2.0/oai_dc/");
@ -98,6 +98,8 @@ class Oaipmh_Importer extends Importer {
$records['records'][] = $record_processed; $records['records'][] = $record_processed;
$record_processed = []; $record_processed = [];
} }
$j++;
} }
} }