git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Fredrik Gustafsson
Message 2 of 2 in “[RFC] speed up git submodule”
  1. Fredrik GustafssonJun 17, 2013
  2. Thomas RastJun 17, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.