Re: Slow with direct action on mavericks 10.9.2
Aaron Rosenzweig <[email protected]> Wed, 30 Apr 2014 17:14:04 -0400
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Hi Jürgen, Ahh so: 1) Before upgrading to Mavericks going through Apache to the .woa was fast 2) After upgrading to Mavericks going through Apache to the .woa was way too slow 3) After upgrading to Mavericks bypassing apache on a direct port to your .woa is perfectly fast Very curious but at least you know: A) It’s not a problem with your java code B) It’s not a problem with being on Mavericks C) It’s probably a problem with Apache or with ports such as 80 Have you experimented with any Internet filters from command line or with a GUI like “Charles” ?: http://www.charlesproxy.com Try this, put that big file in a public directory that Apache can serve up. Then just try accessing that file from your web browser through Apache completely cutting WO out of the picture. Not as a permanent solution, just a quick test. I bet you’ll find it’s getting served up slowly by Apache. In other words, it doesn’t sound like a WO problem, it’s somewhere else. Please let us know if you figure it out, AARON ROSENZWEIG / Chat 'n Bike e: [email protected] t: (301) 956-2319 On Apr 30, 2014, at 10:57 AM, Jürgen Rohrbach <[email protected]> wrote: > Hello Aaron, > > thanks for your response. > i have tried it but without success. > the speed problem only occurs, when the app is accessed via normal installing with javamonitor. > if i direct connect to the app via the port the speed is ok! > > > Thanks, > > Jürgen > > > > Am 30.04.2014 um 15:12 schrieb Aaron Rosenzweig: > >> Hi Jürgen, that’s certainly annoying. >> >> For “giggles” perhaps try a “BufferedInputStream” to encapsulate your FileInputStream. See what happens. >> >> What is truly best “depends” but since you are feeling pain right now just try it out. Here’s some discussion of when one approach is better than another: >> >> http://stackoverflow.com/questions/3122422/usage-of-bufferedinputstream >> >> After reading that I’d suspect “buffered” to be slower for you but maybe not - I can’t picture all the dependent pieces in my head. Buffering may help you out so give it a shot. >> >> For what it is worth, ERAttachment chooses to do buffering. look at the code in: >> >> ERAttachmentRequestHandler.handleRequest() >> >> Cheers, >> Aaron Rosenzweig / Chat 'n Bike >> e: [email protected] t: (301) 956-2319 >> >> >> On Apr 29, 2014, at 7:59 AM, 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