You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a custom compiler that, after compiling a file, prints the dependencies to std::err. In my case, printing to std::err might take about 2-3 seconds.
I tried to exclude Ninja from the process of reading from std::err by redirecting the Subprocess's std:: err to nul:
startup_info.hStdError = nul;
With this change, writing to std::err only takes a few microseconds.
Is there a way to fix this issue and improve interprocess communication speed on Windows?
The text was updated successfully, but these errors were encountered:
How much data does the compiler print? 2-3 seconds sound like a lot. Is the time spent in capturing the output or actually reprinting it on the console (this is slow on Windows)?
It would help tremendously if you could provide a simple reproduction case, i.e. a fake compiler program that outputs fake dependencies, and a related Ninja build plan, that shows the problem clearly.
On Windows, when Ninja creates a
Subprocess
to compile a file, it redirects theSubprocess
'sstd::out
andstd::err
to read dependencies from it:I am using a custom compiler that, after compiling a file, prints the dependencies to
std::err
. In my case, printing tostd::err
might take about 2-3 seconds.I tried to exclude Ninja from the process of reading from
std::err
by redirecting theSubprocess
'sstd:: err
tonul
:With this change, writing to
std::err
only takes a few microseconds.Is there a way to fix this issue and improve interprocess communication speed on Windows?
The text was updated successfully, but these errors were encountered: