*nix users can try out TCS improvements thanks to Yura's multi-platform optimizations and his 1.9.3 backport of the COW-friendly, Bitmap Marking MRI 2.0.0 GC. Simply use your good friend RVM or rbenv to get started...and tell Michał Papis, THANK YOU.
https://github.com/thecodeshop/ruby/wiki/FAQ#wiki-rvm
https://github.com/thecodeshop/ruby/wiki/FAQ#wiki-rbenv
Windows users can download the binary archive `tcs-ruby193_require_fenix_gc_hash_20120413.7z` built from the https://github.com/thecodeshop/ruby/tree/tcs-ruby_1_9_3 branch from https://github.com/thecodeshop/ruby/wiki/Downloads
Thanks to Hiroshi's and Luis' continued efforts, Fenix (aka faster `File.expand_path` from a Window's API implementation) is fully integrated and enabled by default. You'll should see faster rails startup times and faster requires.
While the existing ruby-core test suite passes when building on both Windows and *nix, we may discover issues that require further Fenix refinements. That said, I'm burning the boats and fully committing to integrating Fenix for future TCS releases.
Finally, for those using TCS Ruby 1.9.3, let us know how its working for you. Blog it. Tweet it. Share it. If you like the optimizations and want them in a future official 1.9.3, advocate for them with ruby-core.
We'll continue the hard work of maintaining 1.9.3 pre-backports for all the optimizations ;)
=== Notable Updates from Previous Release ===
* Yura's trunk-accepted Hash opts and new spinlock protected pool allocation
* Yura's expanded_path update to his cached $LOAD_PATH optimization
* Hiroshi's fileload, Fenix tweaks, and Fenix integration optimizations
* Official ruby-core 1.9.3 backports as of ruby_1_9_3@35295
* OpenSSL 1.0.0h (Windows binary)
* RubyGems 1.8.21 (Windows binary)
=== Built and Tested On ===
* Win7 32bit/MinGW 4.6.2 (1)
* Win7 32bit/Windows SDK 7.1 (2)
* Arch 3.3.1 32bit/GCC 4.7.0 (3)
* Ubuntu 11.10 32bit
* Debian Squeeze 64bit
(1) make test && make test-all TESTS='openssl fiddle psych zlib io json mkmf pathname stringio erb fileutils ruby/test_io.rb ruby/test_io_m17n.rb ruby/test_file.rb' [1 test_utime failure, 1 test_invalid_advise(TestIO) Errno::EBADF error]
(2) nmake test
(3) make test && make test-all [2 version string failures, 2 WEBrick failures]
=== Build Recipe Summary ===
git checkout tcs-ruby_1_9_3
git reset --hard codeshop/ruby_1_9_3
git rebase winstat/ruby_1_9_3
git rebase st_opt/ruby_1_9_3
git rebase win-file/ruby_1_9_3
git rebase cached-lp/ruby_1_9_3
git rebase sorted-lf/ruby_1_9_3
git rebase backport-gc/ruby_1_9_3
rake ruby19 local=C:\Users\Jon\Documents\RubyDev\ruby-git dkver=mingw-32-4.6.2
# run tests
=== Rails 3.2.3 (Win7 32bit) Startup Time Improvement ===
# `rails new rails-empty`
C:\rails-empty>ruby --version
ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
C:\rails-empty>timer ruby script\rails r "puts %Q{$: = %s\n$\" = %s} % [ $LOAD_PATH.size, $LOADED_FEATURES.size ]"
$: = 59
$" = 745
real 7.778
system 5.834
user 1.840
# `rails new rails-empty`
C:\rails-empty>ruby --version
tcs-ruby 1.9.3p179 (2012-04-11, TCS patched 2012-04-11) [i386-mingw32]
C:\rails-empty>timer ruby script\rails r "puts %Q{$: = %s\n$\" = %s} % [ $LOAD_PATH.size, $LOADED_FEATURES.size ]"
$: = 59
$" = 750
real 1.981
system 0.920
user 1.014
Jon
---
Fail fast. Fail often. Fail publicly. Learn. Adapt. Repeat.
http://thecodeshop.github.com | http://jonforums.github.com/
twitter: @jonforums
Don't know if a pre built gem will work out of the box like this one, specially due FD_SETSIZE added to rubyinstaller recipe.
Sorry for top posting. Sent from mobile.
On Win7 32bit, I get the same segfault when running on plain vanilla 1.9.3p179
C:\Users\Jon>ruby -reventmachine -ve "puts EM::VERSION; EM.run {}"
ruby 1.9.3p179 (2012-04-11 revision 35295) [i386-mingw32]
1.0.0.beta.4.1
C:/ruby193/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4.1-x86-mingw32/lib/eventmachine.rb:179: [BUG] Segmentation fault
...
But I don't see a SEGV on the official released 1.9.3p125
C:\Users\Jon>ruby -reventmachine -ve "puts EM::VERSION; EM.run {}"
ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
1.0.0.beta.4.1
...
Might be related to FD_SETSIZE, need to investigate since it will affect all the existing pre compiled binaries.
Sorry for top posting. Sent from mobile.
https://github.com/oneclick/rubyinstaller/issues/104#issuecomment-4360131
https://github.com/eventmachine/eventmachine/pull/303#issuecomment-4401783
According to these comments, unmatched FD_SETSIZE seems to cause segfault.
I tried to build eventmachine with this patch. eventmachine started
without segfault, but crashed after Ctrl-C.
diff --git a/ext/project.h b/ext/project.h
index 893a4a8..8d55629 100644
--- a/ext/project.h
+++ b/ext/project.h
@@ -82,7 +82,7 @@ typedef int SOCKET;
#ifdef OS_WIN32
// 21Sep09: windows limits select() to 64 sockets by default, we
increase it to 1024 here (before including winsock2.h)
-#define FD_SETSIZE 1024
+// #define FD_SETSIZE 32767
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
C:\Users\hiroshi\work\empty>ruby -reventmachine -ve "puts EM::VERSION;
EM.run {}"
tcs-ruby 1.9.3p179 (2012-04-11, TCS patched 2012-04-11) [i386-mingw32]
1.0.0.beta.4
C:/tcs4/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:1
86:in `run_machine': Interrupt
from C:/tcs4/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/even
tmachine.rb:186:in `run'
from -e:1:in `<main>'
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
--
Hiroshi Shirosaki
I can't find any reference to these issues on the web. In theory, if
Ruby was build with FD_SETSIZE bigger than what EventMachine is using,
it will only affect the number of file descriptors from fd_set it will
iterate over using select():
http://support.microsoft.com/kb/111855
And shouldn't segfault as fd_set contains a counter with the number of FD in it.
http://marc.info/?l=openssl-users&m=109396896030470
I'm investigating this right now, FD_SETSIZE seems also affect Ruby:
http://bugs.ruby-lang.org/issues/6228
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
Worth to mention an issue that might sound similar from Python:
http://bugs.python.org/issue12287
checking if FD >= FD_SETSIZE
Will be we could do a debug build of both ruby and eventmachine and
get this through GDB.
On Sat, Apr 14, 2012 at 12:43 PM, Luis Lavena <luisl...@gmail.com> wrote:
> On Sat, Apr 14, 2012 at 12:39 PM, Hiroshi Shirosaki
> <h.shi...@gmail.com> wrote:
>>> Might be related to FD_SETSIZE, need to investigate since it will affect all
>>> the existing pre compiled binaries.
>>>
>>
>> https://github.com/oneclick/rubyinstaller/issues/104#issuecomment-4360131
>> https://github.com/eventmachine/eventmachine/pull/303#issuecomment-4401783
>>
>> According to these comments, unmatched FD_SETSIZE seems to cause segfault.
>>
>
> I can't find any reference to these issues on the web. In theory, if
> Ruby was build with FD_SETSIZE bigger than what EventMachine is using,
> it will only affect the number of file descriptors from fd_set it will
> iterate over using select():
>
> http://support.microsoft.com/kb/111855
>
> And shouldn't segfault as fd_set contains a counter with the number of FD in it.
> http://marc.info/?l=openssl-users&m=109396896030470
>
> I'm investigating this right now, FD_SETSIZE seems also affect Ruby:
> http://bugs.ruby-lang.org/issues/6228
>Worth to mention an issue that might sound similar from Python:
http://bugs.python.org/issue12287
checking if FD >= FD_SETSIZE
Will be we could do a debug build of both ruby and eventmachine and
get this through GDB.