524D / compareMS2

Compare samples by MS2 spectra
MIT License
3 stars 0 forks source link

For self-comparison, skip redundant file checks and memory allocation #54

Open magnuspalmblad opened 8 months ago

magnuspalmblad commented 8 months ago

If the user only selects one file, this dataset will be compared with itself. However, it is still checked twice, and stored in memory twice. I realize that the entire algorithm has to be rewritten to use a single copy in memory, but the second file check is completely redundant and takes unnecessary time. All second-dataset variables (number of spectra etc.) can be assigned the values from the first check for this special case.

The double memory allocation is less of an issue, as if there is not enough memory to compare two files, all other functions of compareMS2 are out of the question as well.