model-writtenrun 6093 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andres Freund traced slow Windows builds to Windows header parsing and proposed defining WIN32_LEAN_AND_MEAN in #1, reporting a reduction from 187 to 140 seconds in his Windows VM and substantial cross-compilation savings; broader header cleanup and precompiled headers were left for future work.
- Andrew Dunstan suggested investigating VC_EXTRALEAN in #2, but Andres explained in #3 that it applied to MFC applications and that further gains would require header cleanup or precompiled headers.
- Ranier Vilela endorsed the patch and reported successfully compiling after removing the direct windows.h include in #4; Andres explained in #5 that indirect inclusion through Winsock would preserve the parsing cost.
- Noah Misch endorsed the one-line change in #6, and Juan José SantamarÃa Flecha proposed guarding the macro definition and moving windows.h before the Winsock headers for clarity in #7; those additional changes were not adopted.
- Amit Kapila independently confirmed faster Windows builds in #8, and Michael Paquier welcomed the improvement in the thread's final message, #9.
- After the discussion ended, Andres committed the patch from #1 as 8162464a25, adding only an explanatory comment; the submitted optimization landed, while broader Windows header cleanup remained future work.