Nicolas Pitre wrote: >On Thu, 11 Sep 2008, Stephen R. van den Berg wrote: >> Nicolas Pitre wrote: >> >On Thu, 11 Sep 2008, Stephen R. van den Berg wrote: >> >> when doing things with temporary branches. The origin field is meant to >> >> be filled *ONLY* when cherry-picking from one permanent branch to >> >> another permanent branch. This is a *rare* operation. >> >... and therefore you might as well just have a separate file (which >> >might or might not be tracked by git like the .gitignore files are) >> >to keep that information? Since this is a rare operation, modifying the >> >core database structure for this doesn't appear that appealing to most >> >so far. >> For various reasons, the best alternate place would be at the trailing >> end of the free-form field. Using a separate structure causes >> (performance) problems (mostly). >Did you try it? No. > I don't particularly buy this performance argument, and >the bulk of my contributions to git so far were about performances. It >is quite easy to load a flat file with sorted commit SHA1s, and given >that origin links are the result of a rare operation, then there >shouldn't be too many entries to search through. Hell, doing 213647 True. >lookups (and many other things like inflating zlib deflated data) with >each of them for commit objects in my Linux repository which has 1355167 >total entries takes only 6 seconds here, or about a quarter of a >milisecond for each lookup. I doubt doing an extra lookup in a much >smaller table would show on the radar. Maybe you're right. The reason why my first knee-jerk reaction is "performance problem" is because: - The field is rarely present. - When it is used, we look for it on every commit we traverse. - This means that finding out the field does *not* exist is the most common operation, and that effort rises linearly with the number of commits visited. Whereas if the information is present in the header or trailer of the commit, finding out that the field does not exist there is rather cheap. But you could very well be right, that the absolute extra time spent might be negligible for all intents and purposes. Nonetheless, the data-integrity argument still holds, i.e. placing it in the commit (header or trailer) automatically protects it. External files need extra care if you want the same integrity protection. -- Sincerely, Stephen R. van den Berg. "Father's Day: Nine months before Mother's Day." -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html