Re: [RFC] speed up git submodule
- From
Thomas Rast <trast@inf.ethz.ch>
- Date
- Jun 17, 2013, 08:29 UTC
- Message-ID
- <87a9mpgmx3.fsf@linux-k42r.v.cablecom.net>
- In-Reply-To
- <1371427503-9678-1-git-send-email-iveqy@iveqy.com>
Fredrik Gustafsson <iveqy@iveqy.com> writes:
Show 16 quoted lines
> The interesting feature would be to run C-functions direct inside lua. I > suppose that would increase speed even more, at the same time as we have > the convinence of a interpreted language. Lua is smaller and faster > (well as always, it depends on what you're doing) than python and ruby. > Perl is a really pain for the windows folks (I've heard). > > A correct implementation for lua support would be to start a > lua-interpreter from inside git.c (or somewhere) and load the lua code > for a specific command. That would make us independent of any target > installation of lua (althought the git binary would increase with the > lua library around 300 kb). > > However I did a quick test using lua as a replacement for sh (without > direct calls to c-functions) and the result is impressive. (However this > is the wrong way of using lua, shell scripting is not something lua is > good at).
Ok, so as you say, to really buy us anything you'd have to interface lua with the C code directly. Otherwise you might as well write it in Perl instead which is already a requirement for a lot of the "niceties".
However, instead of writing against git's C code, you could also interface with libgit2, either from Lua or Perl...
BTW Peff once posted an interface to Lua for the --pretty formatters:
http://thread.gmane.org/gmane.comp.version-control.git/206335
--
Thomas Rast
trast@{inf,student}.ethz.ch