URLConnection question..how to increase performance?
Hi,
I am trying to download a text file using FTP and display it in the browser. The code below is within a JSP page.
My problem is that it works with small files very quickly, but as soon as the file size is large, it is VERY VERY slow. A file which normally takes 30-50 seconds over FTP takes about 25 MINUTES if i use the code below.
How can I increase the speed...?? Should I used different bufferedreaders?
I want to preserve the /n/r of the original file so that the file is readable in the browser.
Thanks for any help....I am new to Java..
URL theUrl = new URL("ftp://"+strHost + strFilePath + strFileName);
URLConnection uc = theUrl.openConnection();
InputStream content = uc.getInputStream();
BufferedInputStream in = new BufferedInputStream (content);
LineNumberReader lnr = new LineNumberReader (new InputStreamReader (in));
String tempStr = "";
String str = "";
while ((tempStr = lnr.readLine()) != null) {
str += (tempStr);
%>
<%=tempStr%><BR>
<%tempStr = "";
%>
<%
in.close();
lnr.close();
/******************************************************/
Hi, thanks for all your suggestions. Here is what i have used finally and it is remarkably fasssstttt.....
It has solved all my problems. I am able to download a text file of over 2MB and display it under 20 seconds.
URL theUrl = new URL("ftp://"+strHost + strFilePath + strFileName);
URLConnection uc = theUrl.openConnection();
BufferedReader reader = new BufferedReader(new InputStreamReader(uc.getInputStream()));
String line;
while( (line= reader.readLine()) != null){
line += "<BR>";%>
<%=line%>
<%}
reader.close();
/********************************************************/
Similar Messages
-
How to increase performance of adobe forms of MSS Business package
Hi
We have implemented MSS business package with PCR adobe forms.
Portal NW04 SP18, ERP 2004 , ADS is Nw04sp16 and abode reader 7.0.7.
we have develped own PCR using existing ISR frame work.
every thing working fine.but user facing performance problem like some times while opening pcr form ,browser gets hang up.
Is there any way to increase performance of adobe forms of PCR.
thanks In advance
GopalHi!
Interactive Forms need a lot of performance on the client side. If the client hangy up I think this is realted to client issues.
Also I would update the forms server to be the same version as the other NW components (Portal).
Sigi -
How to increase performance for early '06 iMac
I am an iMac newbie (so please pardon my ignorance) having just purchased a second-hand iMac. I am very keen on increasing the current performance substantially due to the fact that I will be in the near-term using some rather advanced software.
In other words, are there any steps I can undertake from a hardware perspective (e.g. increase the amount/speed of RAM, etc.)to increase the speed and performance of my recently purchased computer? Please let me know if any additional detail is needed. Thank you so much and I am excited to join the iMac community.
The iMac in question possesses the following characteristics:
Hardware Overview:
Model Name: iMac
Model Identifier: iMac4,1
Processor Name: Intel Core Duo
Processor Speed: 1.83 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 2 MB
Memory: 2 GB
Bus Speed: 667 MHz
Boot ROM Version: IM41.0055.B08
SMC Version: 1.1f5
RAM
BANK 0/DIMM0:
Size: 1 GB
Type: DDR2 SDRAM
Speed: 667 MHz
Status: OK
Manufacturer: 0xCE00000000000000
Part Number: 0x4D342037305432393533435A332D43453620
Serial Number: 0xF3198995
BANK 1/DIMM1:
Size: 1 GB
Type: DDR2 SDRAM
Speed: 667 MHz
Status: OK
Manufacturer: 0xCE00000000000000
Part Number: 0x4D342037305432393533435A332D43453620
Serial Number: 0xF3198999
Intel ICH7-M AHCI:
Vendor: Intel
Product: ICH7-M AHCI
Speed: 1.5 Gigabit
Description: AHCI Version 1.10 Supported
ST3160023AS:
Capacity: 149.05 GB
Model: ST3160023AS
Revision: 3.42
Serial Number: 5MT3HF52
Native Command Queuing: Yes
Queue Depth: 32
Removable Media: No
Detachable Drive: No
BSD Name: disk0
Mac OS 9 Drivers: No
Partition Map Type: GPT (GUID Partition Table)
S.M.A.R.T. status: Verified
Volumes:
Macintosh HD:
Capacity: 117 GB
Available: 87.51 GB
Writable: Yes
File System: Journaled HFS+
BSD Name: disk0s2
Mount Point: /Hi Todd
You and Barbara are correct, the Early Core Duo's only support 2GB of RAM.
http://support.apple.com/kb/SP35
Like lenn5 say's below a Hard Drive swap might help a little, the [Seagate Barracuda 7200.7 160.0 GB|http://www.seagate.com/ww/v/index.jsp?vgnextoid=3f9b3b0c2aeef010VgnVCM100000 f5ee0a0aRCRD&vgnextchannel=f424072516d8c010VgnVCM100000dd04090aRCRD&locale=en-US &reqPage=Legacy] in my 3 year old Core Duo only has a SUSTAINED TRANSFER RATE up to 58 (MB/sec).
Dennis -
How to increase performance in webi report?
Hi Experts,
I have create report top of universe with 1 query.But inside report i created multiple tabs.Data also less but while executing the report it will take so much time. How should decrease the waiting time.
I followed performance optimization:
1. ALL formula created in Bex itself.
2.Enable Query Stripping
3. Remove auto width and auto height.
4.scheduling the report.
Please tell another some performance tuning.You'll want to determine where the time is being spent. You can trace the BW side to see how long it is taking on that end but it is probably the design of the report that is taking the time. Are you using a UNV universe going to a BEx query or a BICs based connection?
Query Stripping is automatically on for BI 4.0 SP5+ for BICs connectivity. There are also a number of optimizations that can help improve performance in the newer Support Packages.
Determining where the bottleneck is is the first step.
thanks
Jb -
Windows 7 - 64 bit and WMware Workstation installed SAP IDES EHP - how to increase performance
Hello,
Can someone help me please.
Situation:
I have installed SAP IDES EHP 6 on external disk (USB 3.0) and use VMware workstation 10.0.1.
Quesition:
How can I increase speed when using SAP application.
PS: I am a beginner in using VMware.
System on Notebook:
Win 7 64 bit, 8 GB RAM, I5 CPU 1,6 GHz
Thank you for your answer and help.
all the best ErwinI've not done it yet with 11g, but prior editions, there are 3 things that have to be done to eradicate an oracle client installation from Windows, after running uninstaller
1) delete the registry key HKLM\software\oracle
2) delete the ORACLE_HOME directory from the file system
3) delete c:\Program Files\oracle -
Easy question - how to increase number of recent files in menu?
This is for CS5 if it matters.
I'm an infrequent Illustrator user (at best) but I have what I hope is an easy question: I want to increase number of recent files showing in the menu.
I can't find a preferece to set such as in PS and almost every other application on the face of the earth. I've tried to reset the preferences file (start Illustrator with ctrl-alt-shift held down) but I'm stuck at 4 files, which I assume is the anemic default option.
Is there an easy way to do this that Adobe has hidded somewhere? As expected, it can't be found in the help, I can't find it on the forums, or even on the net, but I do know it can be done because I can see other installs showing lots of files in the list.
thanks for any help.This might be because of a new feature that you can turn off for each object, and alltogether. When you create a new document at the bottom, make sure 'Align New Objects to Pixel Grid' is unchecked. After you have created a new file, you can still go into the 'TRANSFORM' palette (SHIFT+8), use the little right top menu, and make sure 'Align New Objects to Pixel Grid' is unchecked. And if you want to get fancy with each object; you can select an object, and look at the 'TRANSFORM' palette at the bottom is a place to uncheck the 'Align to Pixel Grid' at your disposall.
Before I found this, it ruined my week.
http://www.kenwells.com -
I have hundreds of these large image files to process. I frequently use SKEW, WARP, IMAGE ROTATION features in Photoshop. I process the files ONE AT A TIME and have only Photoshop running on my IMac. Most of the time I am watching SLOW progress bars to complete the transformations.
I have allocated as much memory as I have (about 14GB) exclusively to Photoshop using the performance preferences panel. Does anyone have a trick for speeding up the processing of these files--or is my only solution to buy a faster Mac--like the new Mac Pro?I have hundreds of these large image files to process. I frequently use SKEW, WARP, IMAGE ROTATION features in Photoshop. I process the files ONE AT A TIME and have only Photoshop running on my IMac. Most of the time I am watching SLOW progress bars to complete the transformations.
I have allocated as much memory as I have (about 14GB) exclusively to Photoshop using the performance preferences panel. Does anyone have a trick for speeding up the processing of these files--or is my only solution to buy a faster Mac--like the new Mac Pro? -
XI 3.0 - How to increase performance using TibCo JMS Adapter...
Hi,
Does anyone have any idea if/which properties can be modified to improve the polling interval of the JMS adapter for Tibco?
Another forum message mentioned a method called setPollingInterval, but this only seems to relate to MQ series.
I have tried options like creating multiple communiction channels pointing to the same non-exclusive queue, increasing the server node count (this improves pickup, but reduces overall throughput as the SLD data is no longer buffered).
I have also tried the method called "setConnAttemptDelay" on the com.tibco.tibjms.TibjmsQueueConnectionFactory class but this did no seem to help.
Any suggestions please?
thanks
BrianThe answer is to either add additional J2EE server nodes to your PI/XI instance or add additional Business Services and configure addition Comms channels for these
-
How to increase performances of a program??
What are the steps you follow to improve performances of programe?
What is the table related to SCHEDULE LINE AGREEMENTS IN SD??Hi,
VBEH and VBEP are the tables for Schedule lines
1. To improve performance for programs...
Dont use into corresponding fields - use into table
Check the performance using the JOin and For all entries , then go on with good one
for comparision delete dupicate entries of checking table
Declare the table fileds as they appear in the db table position wise
try to get the max comparision fields and input parameters
Sort the int table and use read statement with binary search.
use a single loop to modify the itab based on read statement
and also chk this.
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
http://www.erpgenie.com/abap/performance.htm
http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abapPerformanceand+Tuning&
http://help.sap.com/saphelp_nw2004s/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801f7c454211d189710000e8322d00/frameset.htm
Hope it helps u...
Regards,
KK -
Hi All,
This is angeline, I have question how to Increase Table Space using NW2004s/Oracle 10g/OS 2003 server
I check DB02 in SAP, I think I have to increase SAPSR3 Tablespace... can you please tell me how to do that step by step using BR-SPACE
Tablespace name Size(MB) Free(MB) Used(%) Autoextend Total size(MB)
PSAPSR3 24600.00 692.25 97 YES 40000.00
PSAPSR3700 24000.00 7058.06 71 YES 30000.00
PSAPSR3DB 10000.00 6226.13 38 YES 30000.00
PSAPSR3USR 20.00 19.31 3 YES 10000.00
PSAPTEMP 980.00 978.00 0 YES 10000.00
PSAPUNDO 8900.00 5.00 100 YES 10000.00
SYSAUX 200.00 25.38 87 YES 10000.00
SYSTEM 780.00 335.44 57 YES 20000.00
Your answer will be really appriciated
Angelinesorry to burst your bubble, but this is a very basic question that can be answered by basic training (ADM100) or even better yet, Google searching.
I'll be a good sport and give you the program name to look for: BRSPACE
Good luck. -
How to increase RAM & Hard Disk a form at run time can use?
Question: How to increase RAM & Hard Disk a form at run time can use?
Explanation:
I have a problem with a form at run-time. I guess this is due to shortage of RAM/Hard Disk. I want to increase these things so that the form can use more RAM/Hard Disk and it does not crash/cancel. The reason is that when I change/toggle TOOL --> Preferences --> Runtime, Buffer Records and Array Processing parameters, the problem is rectifies intermittantly. That is there is no fix combination of above-mentioned parameters to rectify the problem. After lot of attempts, it gets resolved but only temporarily. Next time I have to modify the form, I get the same problem.
Please help.I am still waiting for an answer to the above question.
May be Oracle Corp. or anyabody, please guide.
M. Tariq -
How to increase the performance of a report
can any body tell me how to increase the performance of a report?////
i have prepared a report to show the expense detail .I have used BSIS and BSAS table.
But whenever I am executing it is facing runtime error (TIME_OUT error ).
Moderator Message: Duplicate Post. Read my comments in your previous thread.
Edited by: kishan P on Nov 25, 2010 1:38 PMPlease SEARCH in SCN before posting.
Also post performance related issues here. -
How to increase the performance in server 2008 R2 for RDP users
Hi,
My application take to much time to load. If anyone double click on mail client the exe file will appear in task manager but it will open after 5 mins. how to increase the performance.
My sever configuration is as below,
SC2600 Intel motherboard with total 24 core processors and 32 GB RAM and 8 TB Hard Disk. RAID 5 is configured which has two lungs one is 167 GB for C drive and other is 4.5 TB for D drive.
There are 28 Thin-clients connected to server through L300 N computing Thin-clients.
Thin-clients connect to V-space server installed in server for RDP users to get connected.
we have installed around 20 applications including printer and scanner driver. And apps are has below,
Firefox browser, windows mail, Adobe acrobat XI, canon printer and scanner drivers, Epson printer and scanner driver, E scan anti-virus, office 2007, v space, power ISO, win-rar,Tally and e token drivers and some backup software's.
Below are the services and features enabled,
AD, File services, RDP, web server, Hyper-v, .net frame work.
Is there a way to increase the performance .
Very slow performance.Hi,
what would you suggest on hardware configuration must be for above mentioned applications and services with those many users.
how many cores and ram size is required. -
How to increase the performance of a program
How to increase the performance of a program.
Regards
Lisa
Message was edited by: Lisa RoyHere are some links that may help.
http://www.sapinsideronline.com/searchspi/search.htm?page=article&key=20297&query_text=performance%7Ctuning
http://www.sapinsideronline.com/searchspi/search.htm?page=article&key=44221&query_text=performance%7Ctuning -
How to increase the performance of Weblogic server 7.0?
How to increase the performance of Weblogic server 7.0 ?
also, how do i avoid typing the server login and password evertime I start the
webserver?How to increase the performance of Weblogic server 7.0 ?It depends on what is not running fast enough for you.
also, how do i avoid typing the server login and password evertime I
start the webserver?In the startWebLogic shell script (.cmd or .sh) add:
set WLS_USER=weblogic
set WLS_PW=password
(Replace "password" with whatever your password is.)
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com/coherence.jsp
Tangosol Coherence: Clustered Replicated Cache for Weblogic
"winston" <[email protected]> wrote in message
news:3fe42d33$[email protected]..
>
Maybe you are looking for
-
Ideally I'd like to speak to someone from the UK as I feel I can't write out everything I want to say because it's too confusing and it isn't just one question. I need help with setting photoshop so the images are the best quality on screen and for w
-
Problem with Shopping cart's currency
Hello, I've got a problem with shopping cart's currency. I create the shopping cart with 1 item currency "EUR", I see in my backend ECC 5.0 , my purchase requisition have got a currency in "CHF". System SRM : SRM 5.5 System ECC : 5.0 The scenario for
-
Anyone know of any killer countdown web widgets?
New to iweb, just now figuring out the use of web widgets and they sure seem cool but a bit hard to navigate as to what is what out there. I'd like to know if anyone an point me to their favorites, in particular I am looking for a countdown widget, w
-
I am trying to export a 1600 x 1200 FLV from after effects. I believe this is too big to handle? I don't know what the problem is but I keep getting an error: After Effects: AEGP Plugin Media IO Plugin. There is a mismatch between Output Module setti
-
Unknown files being attached to outgoing mail
I recently sent an email to a friend who is on an AOL acct. I attached a JPEG to the email, and that came across fine. Also attached to the email were 4 .txt files (0001.txt, 0002.txt, etc) These files contained 'gibberish' according to the recipient