Check before looping to add filename/archive
Status quo
Currently when importing a project, the loop to add filenames/archives is entered, even if none of the options includeArchiveFileName or includeFileSources are selected, resulting in an additional pass over all rows.
References:
- for tabular data the code is in
ImportingParserBase.parseOneFile - for tree data the same code is in
TreeImportigParserBase.parseOneFile
Proposed solution
Add a check before entering the loop consisting of the conditions checked inside the loop:
if(archiveColumnIndex >= 0 || filenameColumnIndex >= 0)
Alternatives considered
I understand that the functionality to add the filenames/archives to the project might be moved due to #5034 which might resolve this issue, but since the issue has been open for a while and it seems that it is currently not in progress, a simple check would be a small fix to improve performance until the bigger issue is tackled.
Additional context
--
if accepted: might be a candidate for "good first issue" label