Hi,

I have to read large Excel-files (5sheet, 4000rows, 50columns) with perl. Misereably, the Spreadsheet::ParseExcel modules is really slow and memory hungry on this (> 5min parsing, > 250MB memory).

Therefore I've been looking around and found the nice jakarta POI project, handling exactly the same problem, but in Java. Parsing is quite fast (~30s, 100MB) on the Java process. It was next to no problem to attach this to perl using Inline::Java.

My problem is getting the data back from java to perl. I tried to transfer the data at once, so I created a String[][] per sheet and get it by a function to perl. But when I try to use the values, it is still accessing the Java process, and while parsing takes only 30s, accessing each value of my String[][] of one sheet takes ~2min (about 70% perl and 30% java cpu usage (top)). Using JNI reduced the time but it's still above 1min.


Has anybody a good idea how to transfer the data with only one call to the JVM? Any ideas about other projects reading Excel-files by Perl are welcome, too. (Dropping excel is not possible, misereably.)


Best regards,

Heiko

Reply via email to