3

I am trying to be make a online gcc compiler which can be accessed by the browser. For all this I have use php,cygwin on window XP. Actually I am giving the code window on the browser to the user.


The general process is as:

  1. $source write in .c file
  2. .c file compile by gcc compiler and .exe file created
  3. the output of .exe file is shown to the user.

It's supposed that there is no read function in c program for testing I am use only a single printf statement.


The problem is:

If there are about to 30 simultaneous request means 30 users compiler the program at the same point of time then it will produce output in about 15 seconds, which is too long.

Can some please one help me to reduce this time. Each suggestions are welcomed

Can I just read the output of C program with out making a .exe file.

4

2 回答 2

1

一个起点可以是探索分布式构建系统。

在 Windows 上,我知道一个(非免费)解决方案是Incredibuild。大约 8 年前,我们将它用于我们的一个项目,它将清理和构建时间从 25 分钟减少到 5 分钟左右。这里有一篇评论

现在,当我刚刚搜索其他替代方案和非 Windows 解决方案时,我也找到了distcc

这里还有一个关于Incredibuild 替代品的讨论(看起来很老) 。

于 2012-05-15T11:09:56.493 回答
0

如果每个编译请求的 C 源代码几乎相同,则可以使用启用编译器缓存的构建系统。例如。waf 和 cmake。他们可以利用上一个建筑的副本来加快编译速度。

于 2012-05-15T12:08:28.960 回答