The current XML parsing does not intelligently preallocate the cell array to the size of the data:
A = {};
ii = 1;
while ~feof(fID)
A{ii} = fgetl(fID);
ii = ii + 1;
end
fclose(fID);
This approach, while functional, is not particularly memory efficient and can potentially be a significant bottleneck depending on the size of the XML file being parsed. A more intelligent routine should be used to determine the length of the file and preallocate the cell array accordingly so it is not growing in memory.
The current XML parsing does not intelligently preallocate the cell array to the size of the data:
This approach, while functional, is not particularly memory efficient and can potentially be a significant bottleneck depending on the size of the XML file being parsed. A more intelligent routine should be used to determine the length of the file and preallocate the cell array accordingly so it is not growing in memory.