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

Re: [RFC \ WISH] Add -o option to git-rev-list

From
MCMarco Costalba <mcostalba@gmail.com>
Date
Dec 11, 2006, 12:52 UTC
Message-ID
<e5bfff550612110452t5bb18517yc0cf8278d4d9948c@mail.gmail.com>
In-Reply-To
<200612111026.23656.Josef.Weidendorfer@gmx.de>
On 12/11/06, Josef Weidendorfer <Josef.Weidendorfer@gmx.de> wrote:
Show 12 quoted lines
> On Monday 11 December 2006 01:15, Marco Costalba wrote:
> >               guiUpdateTimer.start(100, true);
>
> What is the result with "guiUpdateTimer.start(0, true);" ?
> There is no need to put in any time interval at all, because
> the timeout is a normal event which will be queued in the GUI
> event queue.
>
> If there were X events in the mean time, they are queued and handled
> before your timeOut function is called again. So the GUI will be
> responsive, even if you have a 0 ms timer.
>
IOW you suggest to use a brute force polling of the pipe.

I'will try this, just to test the pipe, not the application because I would really need to read data in big chunks.

Data read from pipe/file or something else is read in an array (char* []) and do not touched anymore, no more copies are made. For every read a new array is allocated on the heap.

With chunks of 64KB, because each rev descriptions is about few hundered bytes only few revs (about 1% with current linux tree) fall at the boundary of the chunk, half in one and the rest in the next. This boundary revs require a special handling that at the end involves an additional copy.

If I get from the pipe very small data (few KB) probably it would be better to read always in a local array of fixed size and then copy to final destination in memory. But this imply that all the data work copy is duplicated: instead of 30MB of data we'll going to move 60MB (linux tree)

With big chunks of 64KB only about 1% of data (revs that fall at the array boundary) is duplicated.

Previous: Josef WeidendorferNext: Josef Weidendorfer
Message 31 of 36 in “[RFC \ WISH] Add -o option to git-rev-list”
  1. Marco CostalbaDec 10, 2006
  2. Alex RiesenDec 10, 2006
  3. Linus TorvaldsDec 10, 2006
  4. Marco CostalbaDec 10, 2006
  5. Linus TorvaldsDec 10, 2006
  6. Linus TorvaldsDec 10, 2006
  7. Marco CostalbaDec 10, 2006
  8. Marco CostalbaDec 10, 2006
  9. Linus TorvaldsDec 10, 2006
  10. Marco CostalbaDec 10, 2006
  11. Linus TorvaldsDec 10, 2006
  12. Marco CostalbaDec 11, 2006
  13. Linus TorvaldsDec 11, 2006
  14. Marco CostalbaDec 11, 2006
  15. Alex RiesenDec 11, 2006
  16. Linus TorvaldsDec 11, 2006
  17. Linus TorvaldsDec 11, 2006
  18. Marco CostalbaDec 11, 2006
  19. Linus TorvaldsDec 11, 2006
  20. Marco CostalbaDec 11, 2006
  21. Linus TorvaldsDec 11, 2006
  22. Josef WeidendorferDec 11, 2006
  23. Linus TorvaldsDec 11, 2006
  24. Josef WeidendorferDec 11, 2006
  25. Linus TorvaldsDec 11, 2006
  26. Marco CostalbaDec 15, 2006
  27. Linus TorvaldsDec 15, 2006
  28. Marco CostalbaDec 15, 2006
  29. Marco CostalbaDec 15, 2006
  30. Josef WeidendorferDec 11, 2006
  31. Marco CostalbaDec 11, 2006
  32. Josef WeidendorferDec 11, 2006
  33. Marco CostalbaDec 11, 2006
  34. Andreas EricssonDec 11, 2006
  35. Marco CostalbaDec 11, 2006
  36. Andreas EricssonDec 11, 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.