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

Re: Possible regression in git-rev-list --header

From
MCMarco Costalba <mcostalba@gmail.com>
Date
Dec 31, 2006, 11:45 UTC
Message-ID
<e5bfff550612310345j4c882b7av51879ca1175a1c6b@mail.gmail.com>
In-Reply-To
<7v64bsj0s4.fsf@assigned-by-dhcp.cox.net>

I'm sorry to reply only now but I have problems with my internet connection, I am also not able to test Junio patches now.

Regarding qgit parsing 'bug' I would like to point out something that probably is not clear.

1) Parsing routine _must_ be able to sustain the loading of more then
40000 revisions in a couple of seconds, so must be very quick. A lot
of effort has been put to index the header info at maximum speed. Now
it takes about 300ms to parse the whole linux tree. You can have this
only if the header format is 'fixed enough', it means that you would
not expect whole new lines (new '\n' chars) to appear from nowhere in
header, with the exception of log message and parents info lines of
course.
2) I _have_ to rely on headers info because that's where I get data to
show the user, that's the whole point of calling git-rev-list with
--headers option.
3) The rule of double '\n\n' as an indicator of the start of log
message it's not only very slow, it's also broken in cases of no log,
see 7b7abfe3dd81d in Linux tree.
4) We are talking of keeping back compatibility, _fixing_ qgit does
not solves the issues with current qgit users.

So please I really would ask again to *do not print that encoding extra line if not requested to do so*

Thanks again Marco

P.S: One way to really speed up the indexing would be if git-rev-list prints at the beginning the length of the record, i.e. the distance from the next '\0' terminating point. I don't know if this info is already available to git-rev-list before to print the record or has to find it anyway, in the latter case there is no point in doing this. But in the former case it would be possible to avoid a costly find('\0'), starting from the beginning of log message. Log message is more then the half of all the record length so it would be possible to avoid a good amount of unuseful work because only the position of the next '\0' is needed during parsing, not the log message, that is retrieved and shown to the user only on demand, i.e. only for the selected revision.

Previous: Junio C HamanoNext: Johannes Schindelin
Message 8 of 26 in “Possible regression in git-rev-list --header”
  1. Marco CostalbaDec 30, 2006
  2. Jakub NarebskiDec 30, 2006
  3. Johannes SchindelinDec 30, 2006
  4. Junio C HamanoDec 30, 2006
  5. Junio C HamanoDec 30, 2006
  6. Johannes SchindelinDec 31, 2006
  7. Junio C HamanoDec 31, 2006
  8. Marco CostalbaDec 31, 2006
  9. Johannes SchindelinDec 31, 2006
  10. Marco CostalbaDec 31, 2006
  11. Junio C HamanoJan 1, 2007
  12. Johannes SchindelinJan 2, 2007
  13. Junio C HamanoJan 2, 2007
  14. Johannes SchindelinJan 2, 2007
  15. Marco CostalbaJan 2, 2007
  16. Marco CostalbaJan 3, 2007
  17. Junio C HamanoJan 3, 2007
  18. Lars HjemliJan 3, 2007
  19. Marco CostalbaJan 3, 2007
  20. Lars HjemliJan 3, 2007
  21. Andreas EricssonJan 4, 2007
  22. Andreas EricssonJan 4, 2007
  23. Lars HjemliJan 3, 2007
  24. Johannes SchindelinDec 31, 2006
  25. Move commit reencoding parameter parsing to revision.cJunio C Hamano, Dec 30, 2006
  26. Johannes SchindelinDec 31, 2006

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.