-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ruby 2.0.0 #82
Comments
I got the same problem,hope someone can fix it up.... |
Haven't seen this myself. Could you post an example script? — On Sun, Nov 10, 2013 at 11:22 PM, N176CM [email protected] wrote:
|
#!/usr/bin/env ruby require 'rubygems' ROOT_DIR = File.dirname(FILE) s = Roo::Excel.new(INPUT) I have the same problem with ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]. I cannot post the excel file in question, but it's a simple but big (6.5MB) multi sheet file containing only primitive values. With 1.9.3 it parses instantly. |
Same here with ruby 2.0.0p353 xls = Roo::Spreadsheet.open(file.path, extension: :xls) # script hangs after calling this after hitting CTRL-C the next line gives the correct output of cell 1,1 |
It's not roo, it happens with Spreadsheet. (a dependent library) |
OK.I got it------------------ 原始邮件 ------------------ It's not roo, it happens with Spreadsheet. (a dependent library) — |
Ruby 2.1 here... unbelievably long load times for trivially small Excel spreadsheets... I'm going to try and debug... |
-- CTRL-C here since it takes a year and a day
Results minus the uninteresting lines
|
@ashrocket yes.. I'm seeing this stem from Spreadsheet::Worksheet#inspect
This is not roo |
Okay... this is what's going on.. I've suspected this for a while. It's the to_s / inspect calls. Basically if you're testing this out in IRB you implicity (thanks Ruby!) are calling inspect (or to_s?) and a bajillion objects are getting converted in order to do this for you. This is a disaster. compare performance of a call like:
So I guess a solution is to wrap your calls in a block? |
Yes, so I opened up the Gem and added a method, Roo::Excel#inspect
And it flies now... I'll submit a patch... now this kinda is in this library and not in Spreadsheet |
@whistlerbrk -Has this patch been submitted and this issue essentially closed? Thanks. |
@jordanboston this has been addressed with #115 however iirc the method I implemented needs to be implemented on the Google spreadsheet subclass as well. It's slightly difficult to check, I am travelling at the moment. There I also a performance issues ticket open which is possibly / likely related to and solved by this. |
It happens on Ruby 2.1 also. I followed hot fix of @whistlerbrk above and it works. |
If I'm not mistaken, this issue seems to affect an older version of Roo. This issue should probably be closed. |
@stevendaniels If you mean 1.13.2 that is currently the only version available through rubygems... A lot of folks who use roo would like to get the latest and have difficulty (corporate security idiocies) getting at it from github. |
I too wish Roo would be updated on Rubygems. I created an issue (#172) that for that, but I haven't heard anything yet. |
@pmneve you can try beta release on rubygems. |
@simonoff super, will do asap! |
This issue was resolved and ver 2.0.0 of Roo is available on rubygems. Closing. |
CPU 100% under ruby 2.0.0, 1.9.2 works ok!
The text was updated successfully, but these errors were encountered: