weshatheleopard / rubyXL

Ruby lib for reading/writing/modifying .xlsx and .xlsm files
MIT License
1.28k stars 255 forks source link

Why is it so slow #185

Closed westonganger closed 9 years ago

westonganger commented 9 years ago

I like that this gem is more recent and works with XLSX and has better documentation

But why is it so ridiculously slow compared to 'spreadsheet' ?

weshatheleopard commented 9 years ago

@westonganger: I have no idea what spreadsheet is, but for one guess I can give you is because whatever that gem is, it, unlike rubyXL, does not support the full XLSX DOM model.

westonganger commented 9 years ago

spreadsheet is the biggest ruby spreadsheet gem. I didnt do any benchmarks but just to let you know that in the time it took to do 2 lines in rubyXL, spreadsheet did 430.

It may be advantageous to look at their source code for any speed improvements

weshatheleopard commented 9 years ago

time it took to do 2 lines in rubyXL, spreadsheet did 430.

rubyXL works with xlsx files (Excel 2010+ open OOXML format: https://en.wikipedia.org/wiki/Office_Open_XML). spreadsheet works with xls files (Excel97-2007 proprietary Microsoft format: http://www.digitalpreservation.gov/formats/digformatspecs/Excel97-2007BinaryFileFormat%28xls%29Specification.pdf). Binary stuff works faster than XML, what a huge surprise! Next time, please ensure you compare apples to oranges.

This is not to say rubyXL cannot be optimized, it still has a lot of unneeded cruft remaining from version 1, but this gem is not my full time job.