This project has moved and is read-only. For the latest updates, please go here.

Why Seeing No Performance Difference?

Jun 25, 2010 at 11:09 PM

I've implemented NeatUpload in my application and have successfully uploaded files up to 2GB in size.  However, after doing a performance test both with and without the UploadHttpModule, I see no difference in the memory consumption on my server.  The way I am testing it is to change the attribute <system.webServer>/<neatUpload>@useHttpModule to "false".  My understanding is that without the UploadHttpModule, it should return to the default .NET behavior of caching the entire file in memory before writing it to disk.  Yet, I am not seeing this.

I am using .NET 4.0 and IIS 6 running on Vista SP2.

Is this a misunderstanding on my part, or has .NET fixed the memory caching problem in 4.0?

Thanks in advance,

Kevin

Jul 14, 2010 at 3:19 PM
Hi Kevin, It is possible/probable that file upload memory usage has been improved in .NET 4. It would be interesting if you could test it under .NET 3.5 and see if you can confirm this. Dean Brettle stopped work on NeatUpload this May and may not have done much work with .NET 4. I'm not knowledgeable enough of the implementation details myself to know the answer but if you test and see a difference under .NET 3.5 it would be interesting to know. Best, Joe
Jul 14, 2010 at 5:15 PM

Joe,

I have been able to verify that without the NeatUpload components installed at all, we can upload large files without memory problems.  This was done using some config file entries that appear to have been supported since .NET 2, according to MSDN.  Specifically, two modifications to the web.config file are required:

  • Set the maxRequestLength attribute on the system.web/httpRuntime tag (as shown below),
  • Set the maxAllowedContentLength attribute on the system.webServer/security/requestFiltering/requestLimits tag (also shown below).

Additionally, the requestLengthDiskThreshold attribute on the httpRuntime tag can be set to tell .NET to start caching the uploaded file on disk once the upload reaches a certain size.  Note that the file sizes in the httpRuntime tag are expressed in KB, whereas those in requestLimits are in bytes (Thanks, MS, for that confusing inconsistency!).

On a separate note, I will say that while this doesn't invalidate the need for NeatUpload because of the other features it offers, you should consider being more responsive to support requests if you are going to continue making NeatUpload available to people.  Otherwise, you should note on CodePlex that this software is no longer being actively developed OR supported.

Kevin


<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="2097152" requestLengthDiskThreshold="8192" executionTimeout="900"/>

...

<security>
    <requestFiltering>
        <requestLimits maxAllowedContentLength="2147483648" />
    </requestFiltering>
</security>

Jul 14, 2010 at 7:59 PM
Hi Kevin, Thanks for the info. I actually updated the project home page earlier today to clarify the extent to which the project is currently being maintained. It is open source and others who are interested in moving it forward could get involved at any future point. There are lots of open source components that are not maintained actively but still are useful to many people. Best, Joe