Reduce C compilation time with 30 concurrent programs

I am trying to create an online gcc compiler that a browser can access. For all this I use php, cygwin on an XP window. In fact, I provide the user with a code window in the browser.


General process:

  • $ source write in.c file
  • .c compiles the gcc compiler file and the .exe file.
  • the output of the .exe file is shown to the user.

It was assumed that there is no reading function in program c for testing. I use only one operator printf.


The problem is this:

If 30 simultaneous requests are requested by 30 users, the program compiler at the same time, this will lead to an exit in about 15 seconds, which is too large.

Can anyone help me reduce this time. All suggestions are welcome.

Is it possible to simply read the output of a C program without creating a .exe file.

+3
source share
2 answers

A starting point may be to study distributed assembly systems.

On Windows, I know the Incredibuild (proprietary) solution . We used it for one of our projects about 8 years ago, and this reduced the cleanliness and assembly time from 25 minutes to 5 minutes. There is an overview of this here .

Right now, when I was just looking for other alternatives and windowless solutions, I also found distcc .

It also discusses (seemingly old) about the Incredibuild alternative .

+1

C , , . E. g. waf cmake. .

0

All Articles