J
James Macbell
I think I have pushed ASP.NET to the limit, I am not sure if I have done
anything wrong in the code because I am trying to make 2 pieces of code (C#
vs PHP) using the same algorithm. Anyways, here is the my test.
How: Create a HTML page with 2 hyper links to these files (posted below).
Right click, Save target As.
Tested: On my P4 1.6 GHz , 1 GB Ram server, Windows 2000 IIS 5 and Apache
1.3 for win32, 100 Mbps LAN
Sample Size: 150 MB download
Result: IIS stopped responding when I tried to download the link to my local
HDD across the 100 Mbps network, then it poped up window saying "request is
unavailable". PHP worked without problem at all, I verified the saved file
was 150 MB on my local HDD.
Note:
1. In C# buffer += "x"; is a bit expensive but I have tried StringBuffer,
doesn't matter, it only runs for 1024 times anyways.
2. I also tried to set Response.BufferOutput = false in C#, but the download
speed was so slow like back in dial-up ages and the HDD was spinning like
crazy.
- James
ASP.NET code
===============================================
<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<script language="C#" runat="server">
void Page_Load() {
int size= 156105356; // 150 MB data
String buffer = "";
for (int i=1; i<=1024; i++)
buffer += "x";
for (int j=1; j<=size/1024; j++)
Response.Write(buffer);
}
</script>
PHP code
===============================================
<?php
$size= 156105356; // 150 MB data
$buffer = "";
for ($j=1; $j<=1024; $j++)
$buffer .= "x";
for ($i=1; $i<=($size/1024); $i++)
echo $buffer;
?>
anything wrong in the code because I am trying to make 2 pieces of code (C#
vs PHP) using the same algorithm. Anyways, here is the my test.
How: Create a HTML page with 2 hyper links to these files (posted below).
Right click, Save target As.
Tested: On my P4 1.6 GHz , 1 GB Ram server, Windows 2000 IIS 5 and Apache
1.3 for win32, 100 Mbps LAN
Sample Size: 150 MB download
Result: IIS stopped responding when I tried to download the link to my local
HDD across the 100 Mbps network, then it poped up window saying "request is
unavailable". PHP worked without problem at all, I verified the saved file
was 150 MB on my local HDD.
Note:
1. In C# buffer += "x"; is a bit expensive but I have tried StringBuffer,
doesn't matter, it only runs for 1024 times anyways.
2. I also tried to set Response.BufferOutput = false in C#, but the download
speed was so slow like back in dial-up ages and the HDD was spinning like
crazy.
- James
ASP.NET code
===============================================
<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<script language="C#" runat="server">
void Page_Load() {
int size= 156105356; // 150 MB data
String buffer = "";
for (int i=1; i<=1024; i++)
buffer += "x";
for (int j=1; j<=size/1024; j++)
Response.Write(buffer);
}
</script>
PHP code
===============================================
<?php
$size= 156105356; // 150 MB data
$buffer = "";
for ($j=1; $j<=1024; $j++)
$buffer .= "x";
for ($i=1; $i<=($size/1024); $i++)
echo $buffer;
?>