{"thread":{"id":"66467","subject":"OT - Idea for Speeding Up Building Git and Other Large C/C++ Packages","startedAt":"2026-10-05T16:36:20Z","lastAt":"2026-10-05T16:36:20Z","messageCount":1,"participants":["Jon Forrest"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"554196","messageId":"11a0jm6$p29$1@ciao.gmane.io","threadId":"66467","inReplyTo":null,"subject":"OT - Idea for Speeding Up Building Git and Other Large C/C++ Packages","fromName":"Jon Forrest","fromEmail":"nobozo@gmail.com","sentAt":"2026-10-05T16:36:20Z","receivedAt":"2026-10-05T16:36:20Z","isPatch":false,"body":"Git, and other large C/C++ packages, follows the convention of guarding\ninclude files with, for example in http.h, a \"#ifndef HTTP_H\" directive.\nThis is nice because if http.h has already been included, its contents\nwon't be seen more than once by the compiler.\n\nThe trouble with this is that a substantial(?) amount of work\nstill has to get done in order for the preprocessor to see the\n\"#ifndef\", such as opening the include file.\n\nWhat if the preprocessor were changed so that doing \"include http.h\"\nfirst checks if HTTP_H (or some agreed on symbol) is defined,\nand then, if not, actually opens and processes http.h. This would\neliminate the overhead of needlessly opening include files.\nThis obviously wouldn't be a change to Git itself, which is why I\nsaid it's OT, but Git would benefit from it.\n\nIs this a good idea?\n\nCordially,\nJon Forrest\nUC Berkeley (ret.)\n\n\n"}]}