Closed CS76 closed 1 year ago
@CS76
Returning to my previous comment https://github.com/NFDI4Chem/nmrium-react-wrapper/issues/95#issuecomment-1521715492, it appears that our choices are limited regarding this issue because we must read the files on the wrapper side in order to generate the nmrium object that NMRium can load. However, we could consider moving the initial reading process to the server side (API), by doing that we can improve efficiency and make it transparent to the end user.
Shouldn't this be handled on NMRium ?? Why do we preprocess the data again ??
We are not processing the data twice, we just creating a nmrium object (which contains the list of spectra and their references to the physical files, without this step, we can not connect the physical files with each spectrum, you can say it is an essential process to map the files and link them with the spectrum), this process is essential for NMRium to be able to read and export the files correctly, this happens behind the scene once you drag and drop any files.
@hamed-musallam, we can close this issue for now. We now generate the nmrium-compatible data structure for loading spectra on the first load and save it so files are always downloaded only once afterwards which should be okay to go ahead.
We should try to avoid multiple downloads of the same spectra files