I am trying to speedup the ruby1.8.6 'require' function for Windows.
I've noticed that for file that successfully found FileMon reports too
many such errors:
But I do NOT get DeviceIoControl errors from my_test!
So in short
1. I get DeviceIoControl errors from rb_w32_fclose called by ruby.exe
2. I do NOT get DeviceIoControl from rb_w32_fclose called by my_test.exe
3. Errors come from the 'getsockopt' function.
Can any one explain this, please? How can we avoid errors comming from
ruby.exe?
I tested again in such environment:
OS: Vista
Process Monitor: 2.03
Ruby: 1.8.6, 1.8.7, 1.9.0
Used the same a.rb and command line as you. I got similar results for
all ruby versions: every successfull read of a.rb is followed by ~60
DeviceIoControl.
I can't attach my CVS (posting from google site). How did you attach
it?
Used the same a.rb and command line as you. I got similar results for
all ruby versions: every successfull read of a.rb is followed by ~60
DeviceIoControl.
Maybe it's in your environment? Do you somehow require "rubygems"?
I can't attach my CVS (posting from google site). How did you attach
it?
I sent it via Newsreader to the newsgroup comp.lang.ruby.
The DeviceIoControl lines are gone. Then I checked the speed. I
installed rails 2.2.2, then did:
1. irb -rubygems
2. s = Time.now; require 'activesupport'; e = Time.now; e.to_f - s.to_f
For normal ruby results was:
~ 1.16 sec
For patched ruby:
~ 1.00 sec
Not a big advantage, but any way. Going to see if in more complex
situations this can be more valuable...
I see the same issue here, with MSVC builds. However, with MingW
builds, i don't get the problem. The is_socket function you mention
has been changed significantly in 1.9.1 anyway.
···
On Dec 17, 4:26 am, Alex 2k8 <abc3...@gmail.com> wrote:
This was not a patch, just an experiment. I simply commented a call to
is_socket in rb_w32_fclose function. The 'require' works, but socket
related functionality whould be broken And as for now I see no
significant improvements, not going to continue.