Comments (5)
We'd discussed it and I raised my having bad experience performance-wise with FFI stuff in the past. Native bindings are almost always the best performing. The only ruby implementations I can think of that would be of concern currently are jRuby and IronRuby.
jRuby is getting c-extension support soon (1.6?) so this might be less of an issue then. But, native java bindings is definitely be the better way to go for jRuby.
I'm not even sure IronRuby has FFI support yet, but it may?
Maybe we (or someone who wants to contribute) could look at adding FFI bindings in addition to the C extension so we could fall back on platforms that need FFI.
Any takers? :)
from rugged.
FFI is slow and mostly un-awesome. We aim to be fast and awesome. Have you seen the custom back-end support in the "decoupling" branch? That's the kind of awesome stuff that is unfeasible when wrapping over FFI.
JRuby is going to support C extensions natively very soon, and there are .NET bindings for libgit2 on the works which are already usable from IronRuby.
Rugged is already compatible with Rubinius, MRI (duh!) and REE... So there are really no plans to migrate to FFI at the moment. At least until I get an aneurysm.
Thanks for your concern, though! Is there any other Ruby platform you'd like to see Rugged working on?
from rugged.
Nope. Thanks for your explanation, i had no idea FFI was so slow, so that's news to me :)
Cheers,
from rugged.
Note that native C extensions are far slower on Rubinius and JRuby than FFI extensions, due to a thing commonly known as synchronization hell (constantly coping all objects accessed from C level, since it doesn't know when some C ext decides to change the content).
from rugged.
Right, on those platforms we get "handles" back instead of raw pointers like MRI/YARV. Given that, I'm personally not opposed to adding an FFI based driver in addition to the C extension so we can get the best of both worlds. I definitely wouldn't want to have to trade performance in MRI for jRuby/rbx if we could get it on both. I'm just not sure FFI stuff is on the immediate timeline given the rest of the API that need to be fleshed out in libgit2 itself (and here in rugged there after).
I'd happily work with someone wanting to contribute some work to at least get it started though.
from rugged.
Related Issues (20)
- rugged misinterpreting branch name as a SHA HOT 1
- Failed to build gem native extension: library not found for -lssh2 HOT 3
- No documentation on how to build rugged v1.4 with ssh support HOT 2
- Cannot install 1.5.0, 1.4.4 works fine. HOT 9
- Support for .mailmap when reading authors? HOT 2
- Read files from remote repository without cloning HOT 3
- cannot load such file -- rugged/2.7/rugged (LoadError) HOT 3
- Ruby 3.2 compatibility fix is not yet released HOT 10
- Problems installing
- Release new version containing 9f9bce7 HOT 1
- Rugged::Repository.init_at does not create a branch HOT 2
- extconf.rb doesn't find libgit2 from GNU Guix HOT 2
- no tag for 1.6.3 HOT 1
- libssh2 issues with Ruby profilers -- would a workaround PR be acceptable? HOT 9
- invalid or unknown remote ssh hostkey when connecting to Github.com HOT 1
- pygit2 has Repository.merge method but Rugged does not HOT 2
- Rugged is incompatible with libgit2-1.7
- rugged does not seem to work with TruffleRuby HOT 2
- Rugged::Repository#clone_at :upstream option has no effect HOT 2
- Parent Refs Inaccurate On Shallow Graft Commits
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rugged.