I have done some tests about reading git-rev-list output with different IPC facilities: - Native Qt QProcess socket based IPC - pipe based: popen() and fread() - redirecting git-rev-list to a file (under tmpfs) and 'block reading' back the file: read() under Qt QFile class. The file, always in memory, is deleted at the end of loading. I have tested with different block sizes and different CPU speed on linux and git trees. The averaged results on linux tree (about 30MB of data) and CPU set at 1.2GHz are: - QProcess 6734ms - pipe and fread() with 64KB blocks 4832ms (38% faster then QProcess) - temporary file and read() with 64KB blocks 4321ms (10% faster then pipe) I have not enough knowledge to understand why temporary file is faster then pipe. My guess is, after reading some docs around, fread() uses a C standard I/O buffer, while read() is unbuffered. To make git-rev-list writing a temporary file I create and run a script more or less like: git rev-list --header --boundary --parents --topo-order HEAD > /tmp/qgit_135902672.txt There is also some additional kludge to get git-rev-list pid, so to use in case of a cancel request arrives while loading. So my request is if it is possible to make git-rev-list write _directly_ to a file, without shell redirection, I would ask if it is possible: - Add a -o, --output option to git-rev-list to specify output file instead of stdout - Use an unbuffered binary block write to be as fastest as possible - Do *not* flush ever the file, it's only a waste under this scenario. This will let me to avoid the shell launching crap and probably gain also some more speed. I understand this could be not exactly a top priority feature for git people, but I would really like to get the best possible interface with the plumbing git and the -o options is also a very common one. Thanks Marco P.S: On another thread I explained why I see problematic linking directly against libgit.a I rewrite here for completeness:- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
git: | |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Natalie Protasevich | [BUG] New Kernel Bugs |
