Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Micro opt #17

wants to merge 4 commits into


None yet
2 participants

set of small optimizations:

Remove usage of FFI::Struct, cause string.unpack is just enough
Return usage of IO subclass for Notifier when ruby is not JRuby.
Couple of useless microoptimizations.

funny-falcon added some commits Apr 9, 2012

@funny-falcon funny-falcon micro optimization: cutting string without shortliving temporaries d41a5fc
@funny-falcon funny-falcon remove use of FFI::Struct for event parsing
String::unpack does the job pretty well
@funny-falcon @funny-falcon funny-falcon return usage IO subclass for Notifier on not jruby
Use subclass of IO for Notifier, as it were in early versions of rb-inotify,
except for jruby, where separate class created.
Link appropriate class to INotifier::Notifier.
@funny-falcon @funny-falcon funny-falcon couple of microoptimizations 6df42c4

I've made a couple of fixes and repush branch, so that comment is lost.
I don't remember actual reason for "return usage IO subclass for Notifier". I think, it is just an optimisation, but maybe there were issue with EventMachine.
At the end I've chosen to patch EventMachine instead of using rb-inotify.

@nex3 nex3 closed this Dec 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment