Why 2Gb, 3 millions rows, 10 columns CSV file needed 4 hours to be opened by LibreOffice Calc on Core i7 when only 10 minutes needed for php script to open it, convert into 2 dimensions array, make some edits and save?

I’ve created 2gb, 3M rows, 10 columns csv file. Then tried it to open with LibreOffice Calc, and… after 4 hours it was opened. Why so long?

I’ve also opened this file, converted to 2 dimensions array, made some edits, and saved to csv using php script in 10 minutes. So… I expected that office software written on C++, that can easily use multitreading should work at least 20x faster then single threaded php script, but actually it works 20x slower… why??

while (($data[] = fgetcsv($source_h,0,’,’,’"’,"\0")) !== FALSE) //i used this to parse csv file with php

And the LO Version you used is? Latest versions have received some significant performance improvements.

Because it’s two completely different technologies, Calc is not just a two-dimensional array to read strings into.