monitorjbl / excel-streaming-reader

An easy-to-use implementation of a streaming Excel reader using Apache POI
Apache License 2.0
946 stars 343 forks source link

Streaming reader taking Huge CPU to read 100 records. #213

Open ghousemsyed opened 4 years ago

ghousemsyed commented 4 years ago

0

I am trying to upload 100k records from xlsx file and using Excel Streaming Reader to iterate excel It was failing in QA server but made changes

StreamingReader.builder() .sstCacheSize(100) .open(new FileInputStream(new File(filePath))); made it work but it is consuming large CPU resources and other users using particular environment complaining of performance hit.

Any suggestions would appreciate

pjfanning commented 4 years ago

.open(new File(filePath)) is more efficient - with InputStreams, the stream is read into a temporary file and you avoid this with using the File directly.