Re: Slow with direct action on mavericks 10.9.2
Matt Ness <[email protected]> Thu, 1 May 2014 07:15:35 +1000
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Hi Jürgen, What happens when you set your buffer size to a smaller value, 4096, 8192, or at least a power of 2 value? What is the file system block size for the system you are serving from? Is there a speed difference when you use "application/octet-stream"? Regards, Matt -- http://logicsquad.net On 29/04/2014, at 9:59 PM, Jürgen Rohrbach <[email protected]> wrote: > hello, > > i have a empty erxapplication with only on direct action. > the direct action streams a large file. > the problem is that i only get about 120kB/s download speed. > does anybody have a solutions for this problem? > this problem does not exits perior to mavericks! > > > > > > > public WOActionResults downloadAction() throws Exception { > WOResponse aResponse = WOApplication.application > ().createResponseInContext(null); > > // contentTyp > String contentType = "application/octet-string"; > String filepath = "large.tif"; > > aResponse.setHeader(contentType, "Content-type"); > File f = new File(filepath); > int bufferSize = 10000000; > aResponse.setContentStream(new FileInputStream(f), bufferSize, > (long) f.length()); > String fileName = NSPathUtilities.lastPathComponent( filepath ); > aResponse.setHeader("inline; filename="+fileName, "Content- > disposition"); > return aResponse; > } > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Wonder-disc mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wonder-disc ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Wonder-disc mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wonder-disc