Hello,

Over the past months I've been investigating in ways to improve Ruby
performance on Windows from API changes to profiling.

For this I've invested some time and with the great help of the folks
at RubyInstaller group, did the first exploratory changes here:

https://github.com/luislavena/ruby/compare/ruby:trunk...reduce-windows-api-=
calls

These small changes made me notice that several places in file.c
contains duplication of code, like rb_find_file_ext_safe and
rb_find_file_safe or something very platform specific like
realpath_rec implementation.

Because of this, is hard to introduce the usage of newer Windows API
that solve certain issues in a more efficient way.

On example is file_expand_path, which invokes several Windows API
functions in ANSI mode (FindFirstFile) while win32/win32.c is using
the Wide counterparts, making it possible cause of issues.

With this in mind, I'm looking for feedback in moving certain file
function implementations to a platform specific file, similar to
thread implementation.

While there will be some duplication of code in certain functions, it
will help on the long run use more appropriate API for the target
platform.

Will such change viable for inclusion? Development target is trunk
(possible 1.9.4).

All comments are welcome.

Thank you for your time.
--=20
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=E9ry