Faster IO and native line endings
Ruby on Windows has earned a somewhat poor reputation on Windows for being slow, with IO operations coming in for particular criticism. One of the major problems is that Ruby uses "text" mode by default for IO operations instead of "binary" mode.
The term "binary mode" just means "untranslated", i.e. translations involving carriage return and linefeed characters are suppressed.
You wouldn't think something so simple would have a large impact on performance, but it does. Calling IO.read in text mode on a 58 MB file on my laptop in took 2.5s of real time. Running the same code in binary mode on the same file took about .7 seconds. As the file size increases, the difference becomes more pronounced.
Speed isn't the only issue. When writing code on other platforms gem authors tend to forget (or are simply unaware) of the 'b' mode option for IO methods. The result is that you get cross platform bugs caused by the fact that Windows read some binary data, such as marshalled data, in text mode and you end up with data corruption.
Why not make binary mode the default mode? I and others have called for it in the past, and it seems the ruby-core authors have finally come around to their senses and have accepted a patch from Luis Lavena just recently. [1] The bad news? You'll have to wait for Ruby 2.0 to get it. I've also submitted a feature request to allow open_args flags on Windows to accept specialized mode flags like 'S' to optimize for sequential scans, so we can squeeze even more performance from IO on Windows. [2]
Anyway, these are the sorts of performance improvements and bugs that I can help you or your company with. :)
18
Backers
$2,334
pledged of $50,000 goal
0
seconds to go
Funding Unsuccessful This project reached the deadline without achieving its funding goal on May 30, 2012.
Funding period
Apr 30, 2012 -
May 30, 2012
(30 days)
- First created · 3 backed
- Daniel Berger 127 friends
- Website: github.com
Pledge $10 or more
4 backers Limited (996 of 1000 left)
Receive a hand written thank you note for sponsoring this project.
Estimated delivery: Jun 2012Pledge $25 or more
5 backers Limited (995 of 1000 left)
Previous rewards plus a custom backer sticker!
Estimated delivery: Jul 2012Pledge $100 or more
1 backer
Previous rewards plus a free code review and test run of one Ruby library of your choice.
Estimated delivery: Aug 2012Pledge $250 or more
0 backers
Previous rewards plus 1 year of free continuous integration on Windows for one Ruby library of your choice.
Estimated delivery: Sep 2012Pledge $1,000 or more
2 backers
Previous rewards plus personal recognition on the website as a backer. If this price is too steep for you personally, this is a good opportunity to ask your company to contribute.
Estimated delivery: Sep 2012Pledge $5,000 or more
0 backers
Previous rewards, plus corporate recognition on the website as a backer.
Estimated delivery: Sep 2012Pledge $10,000 or more
0 backers
Previous rewards, plus corporate recognition on the website as a backer with front page presence, plus 1 year of free continuous integration on Windows for one Ruby application of your choice.
Estimated delivery: Oct 2012
Comments