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

Re: [PATCH 7/9] strbuf_getwholeline: use getdelim if it is available

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jun 2, 2015, 18:22 UTC
Message-ID
<CAPig+cTctJ0VaKP1GLoWSxsnnq-G=0=fbcgR7tvFY0Daci=1QQ@mail.gmail.com>
In-Reply-To
<20150509010952.GA29555@peff.net>
On Fri, May 8, 2015 at 9:09 PM, Jeff King <peff@peff.net> wrote:
Show 26 quoted lines
> On Fri, May 08, 2015 at 07:56:28PM -0400, Eric Sunshine wrote:
>> I spent some time downloading old Xcode releases and poking through
>> the packages. Xcode 3.2.x seems to be the last in the Xcode 3 series,
>> and none of the Xcode 3.2.x versions I examined carried getdelim().
>> The first package in which I found getdelim() was Xcode 4.1.
>> (Unfortunately, Apple doesn't seem to make Xcode 4.0 available for
>> download anymore or it's only available to paying developers, so I
>> couldn't check it.) According to Wikipedia[1], Xcode 4.1 was released
>> the same day as Lion (OS X 10.7 [2]), but was also available to paying
>> developers for Snow Leopard (OS X 10.6).
>>
>> Consequently, I think it's safe to say that getdelim() is available
>> for Lion (10.7) and later. If we don't mind being a bit less
>> conservative, then we might assume that it also is available for Snow
>> Leopard (10.6), which it definitely supported, but perhaps that's too
>> risky, since not everyone would have been a paid subscriber.
>
> Thanks for digging. I'd argue for the conservative choice, simply
> because this is a pure optimization. The old code should work just fine,
> and people have been living with it for years.
>
> I doubt it will affect many people either way, though. Lion is 4 years
> old, and most OS X people seem to upgrade fairly regularly. It is not
> like long-term server systems where we are supporting Solaris 7. :)
>
> Want to roll a patch?
After a long, long delay, here it is...[1]
Show 6 quoted lines
>> Alternately, we could make the test more dynamic and accurate by
>> grepping stdio.h for 'getdelim' or just by trying a test compile,
>> though that's probably too expensive.
>
> The natural place would be in configure.ac, and that is orthogonal to
> the default Darwin setting, I think.
I added that too[1].
[1]: http://thread.gmane.org/gmane.comp.version-control.git/270576
Previous: Jeff KingNext: Johannes Schindelin
Message 39 of 44 in “address packed-refs speed regressions”
  1. 0/6 address packed-refs speed regressionsJeff King, Apr 5, 2015
  2. 1/6 strbuf_getwholeline: use getc macroJeff King, Apr 5, 2015
  3. 2/6 git-compat-util: add fallbacks for unlocked stdioJeff King, Apr 5, 2015
  4. 3/6 strbuf_getwholeline: use getc_unlockedJeff King, Apr 5, 2015
  5. Jeff KingApr 5, 2015
  6. Jeff KingApr 5, 2015
  7. Jeff KingApr 5, 2015
  8. Junio C HamanoApr 5, 2015
  9. Duy NguyenApr 5, 2015
  10. Jeff KingApr 5, 2015
  11. Junio C HamanoApr 5, 2015
  12. Rasmus VillemoesApr 7, 2015
  13. Jeff KingApr 7, 2015
  14. Rasmus VillemoesApr 7, 2015
  15. Jeff KingApr 8, 2015
  16. 4/6 strbuf: add an optimized 1-character strbuf_growJeff King, Apr 5, 2015
  17. Eric SunshineApr 6, 2015
  18. Jeff KingApr 6, 2015
  19. 5/6 t1430: add another refs-escape testJeff King, Apr 5, 2015
  20. 6/6 refname_is_safe: avoid expensive normalize_path_copy callJeff King, Apr 5, 2015
  21. René ScharfeApr 5, 2015
  22. Jeff KingApr 5, 2015
  23. Jeff KingApr 5, 2015
  24. René ScharfeApr 5, 2015
  25. René ScharfeApr 5, 2015
  26. Jeff KingApr 6, 2015
  27. 0/9 address packed-refs speed regressionsJeff King, Apr 16, 2015
  28. 1/9 strbuf_getwholeline: use getc macroJeff King, Apr 16, 2015
  29. 2/9 git-compat-util: add fallbacks for unlocked stdioJeff King, Apr 16, 2015
  30. 3/9 strbuf_getwholeline: use getc_unlockedJeff King, Apr 16, 2015
  31. 4/9 config: use getc_unlocked when reading from fileJeff King, Apr 16, 2015
  32. 5/9 strbuf_addch: avoid calling strbuf_growJeff King, Apr 16, 2015
  33. 6/9 strbuf_getwholeline: avoid calling strbuf_growJeff King, Apr 16, 2015
  34. 7/9 strbuf_getwholeline: use getdelim if it is availableJeff King, Apr 16, 2015
  35. Eric SunshineApr 17, 2015
  36. Jeff KingApr 21, 2015
  37. Eric SunshineMay 8, 2015
  38. Jeff KingMay 9, 2015
  39. Eric SunshineJun 2, 2015
  40. Johannes SchindelinApr 22, 2015
  41. Jeff KingApr 22, 2015
  42. 8/9 read_packed_refs: avoid double-checking sane refsJeff King, Apr 16, 2015
  43. 9/9 t1430: add another refs-escape testJeff King, Apr 16, 2015
  44. Jeff KingApr 16, 2015

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.