How can I speed up my HTTP,HTTPS calls in Java app?

In a Java application, I am calling web pages generated in ColdFusion, using the doGet(String) method shown below. It seems really really slow... Is there any way that I can speed it up? Is there a different technology/class/strategy I should use?
Thanks.
import java.net.*;
import java.io.*;
import java.lang.StringBuffer;
import java.util.*;
public class VSHttps extends VSAbstractWebConn
    public String doGet(String urlString)
        String result = "";
        try {
            URL url = new URL(urlString);
            URLConnection conn = url.openConnection();
            BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            String inputLine;
            StringBuffer sb = new StringBuffer();
            while ((inputLine = in.readLine()) != null)
                sb.append(inputLine.trim()).append("\n");
            result = sb.toString();
            in.close();
            return result;
        catch (Exception e)
            e.printStackTrace();
        return "";
}

Hi,
please try a different forum.
-- markus.

Similar Messages

  • How can i measure BAPI runtime which has called from JAVA

    Hi abapers
    how can i get run time for BAPI called from JAVA through JCO.
    i know that i can use SE30 from ABAP by executing from SAP.
    may be ST05 useful for me i did it but when display trace
    i am getting big list by seeing this list i am not able to find the runtime for that BAPI.
    please any one can explain
    reagdrs
    ramesh

    Hi Ramesh,
       Irrespective of whether the call is from an external system or within sap, the bapi will be executed in R/3 only.
    So, you can safely measure the runtime using se30 only.
    If it is taking more time when called from JCo , then you can be sure that the problem is not with SAP and is actually due to the JCo connectivity with R/3.
    Regards,
    Ravi

  • How can I do two consecutive HTTP calls?

    Hi all.
    I have an application installed and I can't change its code. This application is a search engine.
    The application forces any user to log in, although the user id is never used for nothing.
    I want to make a direct search, so the users can write the words to search and get directly the results.
    For example:
    -The user writes "journal" and calls my servlet.
    -My servlet makes a sendRedirect to "http://app:port/login.do?userId=guest"
    -The application returns the page "http://app:port/search.do" with the user loaded in the session.
    -Now comes my problem: I want to do another sendRedirect to "http://app:port/search.do?queryString=journal"
    Like the application gives the control to the browser, Im not able to do another call. Making a second sendRedirect throws an IllegalStateException.
    I have tried to use the Jakarta HTTPClient, and it works, but after getting the results, I can't call the application, because I have logged with one session and doesn't recognize me. And I can't simulate all its behaviour.
    I hope to have explained clearly. I apologize for my bad english.
    Thanks in advance.

    The problem is you are not continuing the session.
    For every request you shoudld take the cookie which has the session id that is send with the response and send that cookie back to the server in the next request. Then the server will process all the requests in the same session.

  • HT1338 HOW CAN I SPEED UP MY MAC IT HAS A GRINDING SOUND AND THE COLOUR WHEEL SPIN AND FREEZES

    MY IMAC HAS A GRINDING SOUND AND ITS SLOW, THE WHEEL START SPIINING AND IT FREEZES I HAVE TO TURN IT OFF AND ON AGAIN , WHAT IS THE PROBLEM AND HOW CAN I SPEED IT UP AND GET IT TO RUN FASTER?

    Does the sound appear to be from the hard drive, such as when you do any work (which means the hard drive is being written to)?
    Have you received an email from Apple about their Seagate hard drive recall (for certain iMac models)? Check to see if yours is affected here:
    http://www.apple.com/support/imac-harddrive/
    In any case, a grinding noise is what I had, followed by other very strange behavior and the diagnosis was hard drive failure. So, whether you are covered or not, I would strongly suggest that you backup all your data as quickly as you can and - if you're not covered by warranty or the recall - book an appointment at your nearest Genius Bar for a diagnosis.
    Also, please do not use all caps - difficult to read and it's considering shouting on the internet.

  • How Can I Speed Up My Video Like This? (Example Included)

    iMovie is currently optimizing my video so figured i'd ask this now rather than when i'm editing.
    I recorded video of myself getting a haircut and would like to speed the video up and add some music to it; similar to this video i found on youtube.
    How can I speed up the film like this and slow it down as done in this video?
    http://www.youtube.com/watch?v=-OmFShCpXSU

    Quite easy to do.
    Watch the tutorial here:
    http://www.apple.com/ilife/tutorials/#imovie-timing
    You can access these tutorials and ask questions from within iMovie Help.
    Regards,
    Z

  • HT201272 downloading a movie to IPad taking 24hrs how can you speed it up?

    Downloading a movie purchase from ITunes store to Ipad3 is taking 24 hours. How can you speed it up?

    First, try resetting your device. Press and hold both the home button and the sleep/wake button for about 10 seconds, until the screen turns off. Ignore the slider that will appear. Release the buttons, then press and hold the sleep/wake button until the Apple logo appears. This is the equivalent of a reboot, and should not affect your data or apps.
    If that doesn't help, try restoring your device from backups, and if that doesn't help, restore it to factory settings (ie, do not restore a backup). See:
    http://support.apple.com/kb/ht1414
    If none of that helps, the issue is caused by some kind of hardware problem, and the device will need to be repaired or (more likely) replaced.

  • How can I speed up my MacBook Pro 5,1

    I have a late 2008 MacBook Pro 5, 1
    Processor:   Intel Core 2 Duo
    Processor Speed:   2.4GHz
    Number of Processors:  1
    Total Number of Cores:  2
    Memory 4 GB
    SAT 320 Hard Drive
    How can I speed this up.   I've updated to Maverick
    I've read about adding an SSD - will this work?    Can a novice install???
    Thanks,  Linda

    A model 5.1 MBP, late 15" 2008 can accommodate 8 GB RAM.  That will help since you are using Mavericks.  The best sources for Mac compatible RAM are OWC and Crucial. 
    linda66 wrote:
    I've updated to Maverick
    Snow Leopard is still the most efficient OSX from Apple.  I use it on my 2010 MBP.
    I've read about adding an SSD - will this work?    Can a novice install???
    A SSD will enhance performance significantly in boot, shutdown and resource intensive applications.  In all other aspects, performance will remain the same (such as e-mail, text edit, Internet browsing).
    Installation is easy.  Look at this video from OWC:
    http://eshop.macsales.com/installvideos/macbookpro_15_unibody_hd/
    Understand that SSDs are still expensive.  Consider a hybrid drive, which I use.  For a small premium in price compared to a conventional HDD you do get faster boot and shutoff times.  The same in all other respects.
    Ciao.

  • IMac early 2008 with OS X Lion 10.7.5 running slowly. How can I speed it up?

    iMac early 2008 with OS X Lion 10.7.5 running slowly. How can I speed it up?

    Hello, see how many of these you can answer...
    See if the Disk is issuing any S.M.A.R.T errors in Disk Utility...
    http://support.apple.com/kb/PH7029
    Open Activity Monitor in Applications>Utilities, select All Processes & sort on CPU%, any indications there?
    How much RAM & free space do you have also, click on the Memory & Disk Usage Tabs.
    Open Console in Utilities & see if there are any clues or repeating messages when this happens.
    In the Memory tab of Activity Monitor, are there a lot of Pageouts?

  • How can I speed up the extract() function queries on XML

    Hi,
    Please I need some light on xml and indexes.
    This is my case:
    I use Oracle 9i R2.
    I have a table with some rows containing some few xml documents (each row contains a big xml document).
    Given a value for an attribute of a tag, I want to extract the entire section within the tags.
    Example:
    <MYTAG number="1">
    .....big stuff here
    </MYTAG>
    <MYTAG number="2">
    .....big stuff here
    </MYTAG>
    <MYTAG number="x">
    .....big stuff here
    </MYTAG>
    So for number=2 I would like to extract from the document the xmltype
    <MYTAG number="2">
    .....big stuff here
    </MYTAG>
    I created an index and have followed all the steps from the XML Database Developers Kit manual. Then I would use extrac() as the document says.
    Now some doubts arised:
    Are these text/xml indexes only useful for getting the rowid of my document?
    I mean, if I select 'x' from the table looking for some value, then the index is used. But when I use extract in the select to get the section I look for, the query gets really low, specially when xml documents are big. I think when I have only row with one document, getting the rowid is not the problem, but the extraction from the document is.
    Is the extraction process faster because of the index?
    For what I see, the index only helps me to find the rowid, but then Oracle has to deal with the very big document inside the row. At that point Its oracle against a big text processing and index has nothing to do.
    How can I speed up the extraction of the section?
    If there any other index or tool for help extraction to be faster?
    I would appreciate to know what can I do. I need help on this.
    Thanks in advance!

    Well,
    - What indexes, if any, already exist?
    - What do the functions rl and nice do?
    - What are the current query plans?
    - How restrictive are the various predicates?
    - What version of Oracle?
    Justin

  • I just created a slideshow dvd in imovie, and when I hit finalize it said that it would take 7 hours to finalize.  I've only had my macbook pro for 6 months, and this is the first imovie I've done...is this normal?  If not how can I speed up this process?

    I just created a slideshow dvd in imovie, and when I hit finalize it said that it would take 7 hours to finalize.  I've only had my macbook pro for 6 months, and this is the first imovie I've done...is this normal?  If not how can I speed up this process?  Thanks in advance for all of your help!

    Hi
    Time needed can depend on several things.
    • less than 5 GB free space on Start-up (Mac OS) hard disk = Redicolous long times AND a DVD that most probably will not work OK
    Medicine - I never go under 25GB free space
    • Use of strange file formats into iDVD - can force it to de-code first then re-encode - this can take long long times
    I use
    Video - StreamingDV as from miniDV tape Cameras - or QuickTime Movies Converted to StreamingDV
    Audio - .aiff 16-bit 48 kHz - (no .mp3, .wma etc)
    • Use of old Mac - My G4 600MHz took about 24 hour per hour movie. my dG5 - about 2 hours per hour (I use Pro Quality encoding)
    • Pro Quality encoding - takes about x2 to process a movie
    Yours Bengt W

  • I was getting support for my Office 2008 for Mac, and the support tech said my OS was very slow. I have latest update for Snow10.6.7. Question how can I speed up my Macbook?

    I was getting support for my Office 2008 for Mac, and the support tech said my OS was very slow. I have latest update for Snow10.6.7. Question; How can I speed up my Macbook?

    Hi
    In the first instance, I'd use Onyx and run through its sequence of maintenance and tune up tools:
    Verify, Maintenance, Cleaning.
    I'd also reset the SMC and PRAM (Google them)
    If that doesn't help then I'd look at System Preferences.. > Accounts > Login Items tab (not Login Options).  Check what processes get started at login and decide which ones you don't want.
    After that I'd use Applications/Utilities/Activity Monitor to see if any processes are using a lot of computer power or if anything else nasty might be happening.
    If none of this helped then my final step would be to reinstall OS X.
    Bob

  • Leopard install says it will take 24+ hours... how can I speed things up?

    I encountered some issues with my previous installation of Leopard, so I decided to format, and re-install it.
    I start the installation using "Erase and Install" and after the disk verifies, I start the installation. Only problem is, the installation's giving me an estimated time remaining of 26 hours.
    How can I speed things up?

    monkeyhihi1 wrote:
    I encountered some issues with my previous installation of Leopard, so I decided to format, and re-install it.
    I start the installation using "Erase and Install" and after the disk verifies, I start the installation. Only problem is, the installation's giving me an estimated time remaining of 26 hours.
    Welcome to Apple Discussions:
    That first estimate can be very erroneous. It should quickly settle down to a more reasonable number.

  • How can we speed up delta Process?

    Hi All,
    As per control parameter settings we have max. no processes as 6 and 10 data packages for one Info doc and its the same for that particular infosource settings.
    but when we schedule the delta info package( R/3 - BW ODS) it is using only one process and one (data package per Idoc.
    But when the data is being updated from ODS to cube its using 6 processes ( in SM66) and  almost 6-10 data packages( details tab in scheduler page).
    How can we speed up the delta load from R/3 to ODS, and make it use upto 6 processes.
    Where can I check these settings?
    Thanks in advance.
    Robyn.

    hi
    one of the method to improove the performance in loading to ODS.
    Go for PSA partintioning through RSCUSTV6
    and u can partition the ODS object also RACUSTA2
    then whole data set will split in to the several data packets in PSA and in ODS.
    hope it helps
    bhaskar.

  • My iPad is slowing down, how can I speed it up?

    MY iPad is slowing down, how can I speed it up?

    MY iPad is slowing down, how can I speed it up?

  • How can I speed up PDF generation?

    I am working on 2 manuals in Frame 10, unstructured. I have installed all the latest FM patches. The smaller manual is 270 pages with 200 graphics inserted by reference. It takes 2.5 hours to "Save as PDF." The larger manual is 500 pages, 250 graphics and takes 3 hours to "Save as PDF".
    I have converted graphics to smaller .jpg files. I have freed up as much space on my PC as possible - it has 4GB memory and 300 GB hard drive space available, dual processor with i3 chip. I delete Temp files and reboot before creating PDF.
    If I turn off graphics (Esc+v+v), the PDF is created in just a few minutes.
    What else can I do to produce a complete PDF with graphics in a reasonable amount of time?

    I am a lone writer working on a single PC. No network drives. I open all files in the book before creating PDF.
    Many of the graphics are product photos - how to assemble, etc. I was provided with .psd and .jpg versions. Originally inserted the .psd ones, but then consultant advised us to use the .jpg instead. PDF generation is extremely long either way. Also had numerous huge .tif files that I saved to much smaller .jpg.
    Manuals will be localized and printed. What type of graphics are advised in this case - for good print quality and efficient PDF generation?  
    doolie
    Date: Thu, 26 Jan 2012 11:33:15 -0700
    From: [email protected]
    To: [email protected]
    Subject: How can I speed up PDF generation?
        Re: How can I speed up PDF generation?
        created by Error7103 in FrameMaker General Discussion - View the full discussion
    Are the Frame files and/or the imported objects coming from network servers? If so, you might get a speed up by saving to manual to the local machine prior to printing, and printing to PostScript, where the .ps file is on the local machine. Then Distill separately (if you have the full Acrobat product). Distilling separately* at least frees up Frame for that part of the rendering. I have converted graphics to smaller .jpg files. From what? And I wouldn't have bet that using JPEG would help. The files may be smaller, but they still need to be filtered for export to Ps or PDF, and if they are raster, they may be subject to further processing during PDF generation based on the subsampling specified. You might try sending the objects as EPS (which requires minimal processing into Ps), and you might try making sure that raster images are already at the desired dpi, and require no further downsampling in the rendering flow.

Maybe you are looking for

  • How to find out the tables from extract structures

    Hi All, As I know my data sources are 2lis_04_p_matnr,2lis_04_p_comp,2lis_04_p_arbpl. How to find out the tables concerned with the fields in the extract structure. Thanks

  • Changing theme of application in Flex 3

    Hi All ,below is my  mxml file , in which i am trying to change theme of my flex application by selecting the themes in combo box, but it is not working fine.Is there any bug in code ??? How to change the theme of flex application in Flex 3.. Plzz he

  • Is there a way to have stack numbers show up in filmstrip mode?

    I use filmstrip mode more than grid mode because I like the larger image.  However, stack numbers don't show up (for me) in film strip mode.  When I view stacks in Bridge, the number is very prevalent and easily seen in filmstrip mode. Am I missing a

  • Custom Key Command w/o using a Modifier Key?

    There are several key commands that I wish to assign (actually just want to change) in LP8. But the ones I want to change are all using modifier keys, so this requires two keys. And the secondary modifier key area, the ones you check with a check-mar

  • Cluster File system local to Global

    I need to convert a local High available file system to a global file system. The client needs to share data within the cluster and the solution i offered him was this. Please let me know if there is a better way to do this. The servers are running 2