[Performance] importing larger CSV files #3586
-
We're currently trying to import a somewhat large CSV (50 to 100MB with over 150 columns/fields of which we only need about 30 during rowhandling) and even though we chunk and queue it it really takes a long time. Not to actually parse / work the onRow method calls, but before and after the actual processing of a singel job usually takes minutes. (Even on a smaller CSV file of 2mb with smaller chunk sizes but same column counts) We're currently chunking 1k rows, using batch memory cache. But since the jobs run sequentially this only seems to mitigate the memory issues. My question is: is this normal for this lib? And if so, are there any plans to provide some sort of parallel job handling of sorts? If I need to show code or setup, let me know. Thnx |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
@fruitl00p When dealing solely with CSV imports and wanting high performance, I'd recommend using csv helpers (fgetcsv) (or league/csv) directly. It drops all the overhead that PhpSpreadsheet adds to make it compatible with Excel formats.
There're plans, however I don't have an ETA for it |
Beta Was this translation helpful? Give feedback.
@fruitl00p When dealing solely with CSV imports and wanting high performance, I'd recommend using csv helpers (fgetcsv) (or league/csv) directly. It drops all the overhead that PhpSpreadsheet adds to make it compatible with Excel formats.
There're plans, however I don't have an ETA for it