File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -121,11 +121,11 @@ becomes much faster to have as much information as possible in a
121121single file. That's the purpose of the packed-ref file.
122122
123123Peff discovered that one of his own commit that switched from fgets()
124- to strbuf_getwholeline () to read the packed-ref file was in part
124+ to strbuf \_ getwholeline () to read the packed-ref file was in part
125125responsible for a big slowdown.
126126
127- strbuf_getwholeline () is part of the Git strbuf API that is used for a
128- lot of string related functions. And strbuf_getwholeline () used the
127+ strbuf \_ getwholeline () is part of the Git strbuf API that is used for a
128+ lot of string related functions. And strbuf \_ getwholeline () used the
129129getc() function to get each character one by one until the end of each
130130line, like this:
131131
@@ -138,7 +138,7 @@ while ((ch = getc(fp)) != EOF) {
138138```
139139
140140But it appears that it isn't very efficient. It is also problematic to
141- use fgets() inside strbuf_getwholeline () as strbuf_getwholeline () is
141+ use fgets() inside strbuf \_ getwholeline () as strbuf \_ getwholeline () is
142142used in some parts of the Git codebase to read lines that can contain
143143the NUL character and fgets() would not read after the NUL. (And yeah
144144working around that is not easy either.)
You can’t perform that action at this time.
0 commit comments