Previously we used execFile, it is fine as long as the csv generation is fast, when we start to do with 6k+ files, it is buggy + slow + impossible to get the reuslts (eg. 2.7MB CSV file). So, we can spawn a process, append the data to a varaible, wait till it is completed, and then spit it out.
PS: ExecFile is problematic when we read file-by-file for 6k+ files over network disk, (like main beta server)
This now matches how we do for XLSM export
Secondly, we now restrict the frontend to load only 20 videos instead of 5k/6k videos
Previously we used execFile, it is fine as long as the csv generation is fast, when we start to do with 6k+ files, it is buggy + slow + impossible to get the reuslts (eg. 2.7MB CSV file). So, we can spawn a process, append the data to a varaible, wait till it is completed, and then spit it out.
PS: ExecFile is problematic when we read file-by-file for 6k+ files over network disk, (like main beta server)
This now matches how we do for XLSM export
Secondly, we now restrict the frontend to load only 20 videos instead of 5k/6k videos