Performance issue on swing application

Hi,
I have one swing application and i am facing one performance issue after minimizing the applicaton. The same application is taking 2-5 seconds to redraw the screen again when i am trying to maximize it. Is there any way to improve this redraw delay ?..Is there any way to tweak the Event Dispatcher thread and by this we can overcome correct me if i am wrong? .
Is there anybody facing such kind of issue please help me...
Thanks in Advance,
Anish.

Encephalopathic wrote:
good guess. What do you think? Loading the images in the painting methods?That is a common mistake. To the OP, some common errors when overriding paintComponent include:
1. Loading an image each time paintComponent() is called. Just load it once, cache it, and only draw it in paintComponent, this saves you from the IO of loading the image on repaints.
2. Doing application logic/complex operations in paintComponent. paintComponent should be kept fast, only do painting operations, keep long-running tasks, IO, etc. out of it.
3. To a lesser extent, doing lots of complex painting on a repaint call, maybe lots of transforms, translucency, xor-ing, whatever. For most common painting (at least in my work, YMMV), this isn't a problem, but if it is you should consider drawing all "static" stuff to a buffer (such as a BufferedImage) and just painting the BufferedImage, as opposed to drawing all the static stuff each paintComponent call.
The idea is just to keep the painting logic as fast as possible, to avoid slow repaints as you're seeing. Sometimes people don't realize that paintComponent() will be called every time your component needs to be even partially repainted (minimized/maximized window, partially hidden by another window then revealed again, stretched by window resizing, etc.). That's why things like IO are out of the question.
Of course, I'm babbling now. This may not even be your problem, or you may already know all this stuff. If so, just ignore this post!

Similar Messages

  • Performance technique on Swing application

    Can some one tell me whats the performance technique i should have to follow on any Swing application or Database centric Swing application?
    If i have huge amount of data which is coming from database and that data displaying in table format in Swing application. So, what performance technique i have to follow to improve the performance of Swing application?

    Encephalopathic wrote:
    good guess. What do you think? Loading the images in the painting methods?That is a common mistake. To the OP, some common errors when overriding paintComponent include:
    1. Loading an image each time paintComponent() is called. Just load it once, cache it, and only draw it in paintComponent, this saves you from the IO of loading the image on repaints.
    2. Doing application logic/complex operations in paintComponent. paintComponent should be kept fast, only do painting operations, keep long-running tasks, IO, etc. out of it.
    3. To a lesser extent, doing lots of complex painting on a repaint call, maybe lots of transforms, translucency, xor-ing, whatever. For most common painting (at least in my work, YMMV), this isn't a problem, but if it is you should consider drawing all "static" stuff to a buffer (such as a BufferedImage) and just painting the BufferedImage, as opposed to drawing all the static stuff each paintComponent call.
    The idea is just to keep the painting logic as fast as possible, to avoid slow repaints as you're seeing. Sometimes people don't realize that paintComponent() will be called every time your component needs to be even partially repainted (minimized/maximized window, partially hidden by another window then revealed again, stretched by window resizing, etc.). That's why things like IO are out of the question.
    Of course, I'm babbling now. This may not even be your problem, or you may already know all this stuff. If so, just ignore this post!

  • Performance Issue - 32 Bit Applications vs 64 Bit DB Server

    Dear All,
    My Current set up is as follows:
    Operating System: Windows 2003 Standard Edition R2 64 Bit
    Database: Oracle 10.2.0.1 64 Bit
    Client Connectivity: Oracle 10.2.0.1 32 Bit
    Application: Lotus Domino 7.0.2 FP3 32 Bit
    In the above set up,
    When Application try to fetch the records from DB through client, it takes so much of time as compared to when i run the same with (OS & DB in 32 bit).
    kindly let me know how to do workaround on this, analysation have to be made to overcome this performance issue.
    thanks & regards
    suresh

    1. Check for available statistics.
    2. Verify plans against 32 bit and 64 bit databases.
    3. Analyze the sql trace for the session.

  • Performance issue Java Swing under Windows 7

    Hello,
    we have MDI Java Swing application running under Window7. We got a big problem with performance in MDI Windows using AERO.
    Exist any way for Java to tell Win7 that it should not use Aero??
    Thank you,
    David.
    Edited by: 969767 on 6.11.2012 3:33

    If you try to open properties dialog for application (or app shortcut) there you can see "Compatibility" tab and there is check box "Disable visual themes". If we disable this theme our java swing app is very better performance under Windows 7. We need to disable visual theme via java code, if it is possible...
    Thanks.

  • Regarding Performance Issue in MI Application

    Hii All,
    We have made a SmartSync MI Application.Everything thing is working fine.But the scenario is this that when we try to navigate through the application from one page to another ,for example if i click on one link to get details corresponding to that link(i.e) we are retreiving the data from the local database, but this is taking a lot of time and according to our buisness need we have to reduce this time to fetch the data.
    Can anyone help me regarding this issue what can be done either in coding part, what parameters & standards to follow to improve the performance.
    Thanks,
    Devendra Phate

    hello deven,
    if you are only focusing on your application's performance
    on the aspect of usability i.e. less waiting time, fast
    response UI, i would personally suggest you to use AJAX.
    put some processing part on the browser side and making
    data retrieval from MI asynchronous... this way, your user
    don't have to wait for all data to be presented, but rather
    could work on the data presented in pieces (i.e. asynchronously).
    anyway try googling for AJAX...
    regards
    jo

  • Performance Issue in Web Application: Event 12605 "Web: Text Content"

    Dear All,
    we are about to deploy a couple of rather complex web applications (built with WAD) and are currently running performance tests with Mercury Loadrunner.
    According to these tests our web application become very slow once more than 30 (virtual) users are running the application.
    When analyzing the BW statistics data we found out that most of the runtime of our application comes from an event called "Web Java: Return Text-Type Content" (ID 12605).
    Has anyone experienced the same issue? Or does anyone know what exactly this event means?
    We are using XPATH in our web applications. Could this be a cause for poor performance?
    Any help is highly appreciated!
    Best Regards
    Christian

    Can you tell me more about the detail of loadrunner stress test for BI WAD scripts? We met error when run the load runner for BI WAD report.
    1. We develop the BI report basing WAD 7.x, setup Iview in sap EP for BI report and get the BI report URL.
        2. We fill the report URL in IE(6.0) to run this report and display the bi report successfully ,
    eg: http://epserver:50000/irj/servlet/prt/portal/prtroot/com.sap.ip.bi.web.portal.integration.launcher?sap-bw-iViewID=pcd%3aportal_content%2fcom.ahepc.BI%2fcom.ahepc.iView%2fcom.ahepc.FI%2fcom.ahepc.BI_I_ZWAFI_006&sap-ext-sid=1

  • Performance Issue Of Java Application on Pentium 4

    Dear All
    I have finished an application program, which runs smoothly in PC with Intel Pentium 3 Processor with high performance, but the performance is highly decreased with Intel Pentium 4 Processor. Is it a limitation of Java?
    Im using MS Access database.
    I have restructured the queries but the performance is highly enhanced in P3 but it degrades and sometimes there is no consistency in the performance timmings in P4.
    System Configuration are:
    P3 : 256 MB RAM with Windows 2000 SP2,MS ACCESS 2000
    P4: 256 MB RAM with WIN 2000 SP2,MS ACCESS 2000
    Is there any solution to this problem?
    Pls help!
    Best Regards
    Sourav

    256MB of RAM for a Windows 2000 machine?!?
    You're probably swapping memory.
    - Go into Task Manager and see what is running on each machine.
    ...and see if you can not start up some things.
    - See how much memory you have Available on each BEFORE you run the app.
    - use java -Xmx option to specify less than the available memory you have.

  • Performance issue in web application

    We have installed a web application that uploads a XML file to the server. The application is still in its nascent stage but deployed.
    After analysis we found out that 50 to 100 hits take place at any point of time. We store the XML file as a blog in oracle and use Xquery to retrieve the data. The core apis used are Java Servlets and JSPs and the web server used in Apache Tomcat.
    The hits for upload will increse by 500-600 at point of time.
    I would like to know the following.
    Is the technology used sufficient to handle the issue?
    How can i handle the load balance in the server?

    Use grinder or some other test tool to find out.

  • Performance issues with class loader on Windows server

    We are observing some performance issues in our application. We are Using weblogic 11g with Java6 on a windows 2003 server
    The thread dumps indicate many threads are waiting in queue for the native file methods:
    "[ACTIVE] ExecuteThread: '106' for queue: 'weblogic.kernel.Default (self-tuning)'" RUNNABLE
         java.io.WinNTFileSystem.getBooleanAttributes(Native Method)
         java.io.File.exists(Unknown Source)
         weblogic.utils.classloaders.ClasspathClassFinder.getFileSource(ClasspathClassFinder.java:398)
         weblogic.utils.classloaders.ClasspathClassFinder.getSourcesInternal(ClasspathClassFinder.java:347)
         weblogic.utils.classloaders.ClasspathClassFinder.getSource(ClasspathClassFinder.java:316)
         weblogic.application.io.ManifestFinder.getSource(ManifestFinder.java:75)
         weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:67)
         weblogic.application.utils.CompositeWebAppFinder.getSource(CompositeWebAppFinder.java:71)
         weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:67)
         weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:67)
         weblogic.utils.classloaders.CodeGenClassFinder.getSource(CodeGenClassFinder.java:33)
         weblogic.utils.classloaders.GenericClassLoader.findResource(GenericClassLoader.java:210)
         weblogic.utils.classloaders.GenericClassLoader.getResourceInternal(GenericClassLoader.java:160)
         weblogic.utils.classloaders.GenericClassLoader.getResource(GenericClassLoader.java:182)
         java.lang.ClassLoader.getResourceAsStream(Unknown Source)
         javax.xml.parsers.SecuritySupport$4.run(Unknown Source)
         java.security.AccessController.doPrivileged(Native Method)
         javax.xml.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
         javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown Source)
         javax.xml.parsers.FactoryFinder.find(Unknown Source)
         javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
         org.ajax4jsf.context.ResponseWriterContentHandler.<init>(ResponseWriterContentHandler.java:48)
         org.ajax4jsf.context.ViewResources$HeadResponseWriter.<init>(ViewResources.java:259)
         org.ajax4jsf.context.ViewResources.processHeadResources(ViewResources.java:445)
         org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:193)
         org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
         org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    On googling this seems to be an issue with java file handling on windows servers and I couldn't find a solution yet. Any recommendation or pointer is appreciated

    Hi shubhu,
    I just analyzed your partial Thread Dump data, the problem is that the ajax4jsf framework ResponseWriterContentHandler triggers internally a new instance of the DocumentBuilderFactory; every time; triggering heavy IO contention because of Class loader / JAR file search operations.
    Too many of these IO operations under heavy load will create excessive contention and severe performance degradation; regardless of the OS you are running your JVM on.
    Please review the link below and see if this is related to your problem.. This is a known issue in JBOSS JIRA when using RichFaces / ajaxJSF.
    https://issues.jboss.org/browse/JBPAPP-6166
    Regards,
    P-H
    http://javaeesupportpatterns.blogspot.com/

  • PrepareLogin Performance Issue

    Hi Experts,
    Can you please help me know what are the things I should consider
    because I have performance issue
    when my application is executing "preparelogin.do" it is taking about 30 minutes:
    https://myserver:50001/myappb2b/user/preparelogin.do?secure=ON
    I have the followng config.xml:
    <action path="/preparelogin" type="com.sap.isa.user.action.PrepareLoginBaseAction">
         <forward name="success" path="/login.do"/>
         <forward name="failure" path="/logon/login.jsp"/>
         <forward name="darklogin" path="/login.do"/>
         <forward name="umelogin" path="/base/empty.jsp"/>
    </action>
    <action path="/login" type="com.sap.isa.user.action.LoginBaseAction">
         <forward name="success" path="/toModule.do?prefix=&amp;page=/postLogin.do"/>
         <forward name="failure" path="/logon/login.jsp"/>
         <forward name="pwchange" path="/logon/pwchange.jsp"/>
         <forward name="failureUME" path="/base/error_ume.jsp"/>
    </action>
    <!-- generic forward to switch application modules -->
    <action path="/toModule" type="org.apache.struts.actions.SwitchAction"/>
    <!-- return point for the E-Commerce Logon Module after successful logon -->
    <action path="/postLogin" forward="/b2b/postlogin.do"/>
    <action path="/b2b/postlogin" type="com.sap.isa.isacore.action.b2b.PostLoginAction">
    <forward name="success" path="/b2b/campaignfromMIG.do"/>
    </action>
    Can you please give me idea what may be the possible cause of login performance when it executes PrepareLoginBaseAction? Or are there configurations I need to look at?
    My application uses LDAP authentication then goes to SAP UME authentication.
    Thank you very much in advance.
    jemaru

    Check some of my notes here:
    [http://wiki.colar.net/sap_crm5_0_isa_trex_performance_settings]
    In particular check the JDBC connection(this cause issue very similar to yours) and gateway connection sections, those can cause serious issues like this, this default settings use to be seriously too low, until recent releases.
    A problem in production is harder to debug / trace, but if you can, do the single activity trace as somebody suggested.
    Another option is to increase the logging, that will give you infos on how long each RFC / action class take and should allow you to locate what's slow.
    When the logs are on, they are huge and it's hard to find the relevant data, so i have a small script here, that helps finding the interesting stuff (after turning on logging, you run the script and it will print out interesting lines found in the logs).
    See: [http://wiki.colar.net/isa_action_rfc_tracer]  ... you can use that script, or alternatively use tail/grep to do the same thing (if on *nix)
    Note: edit the script, set the correct SID for your system and set showRFC to true.
    compile it (javac) and run it (java)
    More infos on tracing / debugging options:
    [http://wiki.colar.net/b2c_customization]
    Edited by: Thibaut Colar on Oct 12, 2010 10:37 AM

  • How to troubleshoot JVM performance issues

    We recently had a performance issue with our application running on Java 1.4.2 on Windows where the CPU utilization was extremely high. Using the +PrintClassHistogram option I was able to determine that a char array was utilizing more than 500 megabytes of memory.
    My question is, is there another option I can include or process I can follow that would help me determine which object was creating this array?
    I am not a Java programmer so I apologize if this is elementary question or if I posted this in the wrong forum. I am the SA they call when the application is not running correctly. I have been reading this forum and the manuals trying to find something that would assist me. The developers will fix the problem after I pinpoint where the problem is.
    We do not have any type of JVM profiler so I am trying to troubleshoot this issue with thread dumps and JVM options. My assumption is that if a profiler can retrieve the information I should be able to. Is this a correct assumption?
    Lastly, if we were to purchase a profiler does anyone have a recommendation on which one to use? Our latest version of the application utilizes Java 5 so we would need something that would work with both versions of Java if possible.
    Any assistance or recommendations anyone could provide would be greatly appreciated.

    unixmon wrote:
    We recently had a performance issue with our application running on Java 1.4.2 on Windows where the CPU utilization was extremely high. Using the +PrintClassHistogram option I was able to determine that a char array was utilizing more than 500 megabytes of memory.
    My question is, is there another option I can include or process I can follow that would help me determine which object was creating this array?
    I am not a Java programmer so I apologize if this is elementary question or if I posted this in the wrong forum. I am the SA they call when the application is not running correctly. I have been reading this forum and the manuals trying to find something that would assist me. The developers will fix the problem after I pinpoint where the problem is.
    This is a management problem. If you have a performance problem then you should be calling the developers and telling them to figure it out and that they need to fix it. You certainly shouldn't be looking at code or profilers.
    Unless you have plenty of time on your hands and your goal is to become a developer.
    But regardless...
    Buying a profiler is an option but if you go that route then to figure out a solution you will be a java programmer even if that isn't your title.
    You should however figure out how to simulate load on the server, even with a profiler. There are tools that allow you to send things like http requests, web service requests, etc. Simulating load is a good idea even without a profiler. It allows you to estimate future system needs dependent upon future company growth.
    Note that profiling really slows down an application so an app that can handle 10 requests a second might only be able to do 1 a second or less while being profiled.

  • Performance Issue with sql query

    Hi,
    My db is 10.2.0.5 with RAC on ASM, Cluster ware version 10.2.0.5.
    With bsoa table as
    SQL> desc bsoa;
    Name                                      Null?    Type
    ID                                        NOT NULL NUMBER
    LOGIN_TIME                                         DATE
    LOGOUT_TIME                                        DATE
    SUCCESSFUL_IND                                     VARCHAR2(1)
    WORK_STATION_NAME                                  VARCHAR2(80)
    OS_USER                                            VARCHAR2(30)
    USER_NAME                                 NOT NULL VARCHAR2(30)
    FORM_ID                                            NUMBER
    AUDIT_TRAIL_NO                                     NUMBER
    CREATED_BY                                         VARCHAR2(30)
    CREATION_DATE                                      DATE
    LAST_UPDATED_BY                                    VARCHAR2(30)
    LAST_UPDATE_DATE                                   DATE
    SITE_NO                                            NUMBER
    SESSION_ID                                         NUMBER(8)
    The query
    UPDATE BSOA SET LOGOUT_TIME =SYSDATE WHERE SYS_CONTEXT('USERENV', 'SESSIONID') = SESSION_ID
    Is taking a lot of time to execute and in AWR reports also it is on top in
    1. SQL Order by elapsed time
    2. SQL order by reads
    3. SQL order by gets
    So i am trying a way to solve the performance issue as the application is slow specially during login and logout time.
    I understand that the function in the where condition cause to do FTS, but i can not think what other parts to look at.
    Also:
    SQL> SELECT COUNT(1) FROM BSOA;
      COUNT(1)
       7800373
    The explain plan for  "UPDATE BSOA SET LOGOUT_TIME =SYSDATE WHERE SYS_CONTEXT('USERENV', 'SESSIONID') = SESSION_ID" is
    {code}
    PLAN_TABLE_OUTPUT
    Plan hash value: 1184960901
    | Id  | Operation          | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT   |                    |     1 |    26 | 18748   (3)| 00:03:45 |
    |   1 |  UPDATE            | BSOA |       |       |            |          |
    |*  2 |   TABLE ACCESS FULL| BSOA |     1 |    26 | 18748   (3)| 00:03:45 |
    Predicate Information (identified by operation id):
       2 - filter("SESSION_ID"=TO_NUMBER(SYS_CONTEXT('USERENV','SESSIONID')))
    {code}

    Hi,
    There are also triggers before update and AUDITS on this table.
    CREATE OR REPLACE TRIGGER B2.TRIGGER1
    BEFORE UPDATE
    ON B2.BSOA  REFERENCING OLD AS OLD NEW AS NEW
    FOR EACH ROW
    :NEW.LAST_UPDATED_BY   := USER    ;
    :NEW.LAST_UPDATE_DATE  := SYSDATE ;
    END;
    CREATE OR REPLACE TRIGGER B2.TRIGGER2
    BEFORE INSERT
    ON B2.BSOA  REFERENCING OLD AS OLD NEW AS NEW
    FOR EACH ROW
    :NEW.CREATED_BY        := USER ;
    :NEW.CREATION_DATE     := SYSDATE ;
    :NEW.LAST_UPDATED_BY   := USER    ;
    :NEW.LAST_UPDATE_DATE  := SYSDATE ;
    END;
    And also there is an audit on this table
    AUDIT UPDATE ON B2.BSOA BY ACCESS WHENEVER SUCCESSFUL;
    AUDIT UPDATE ON B2.BSOA BY ACCESS WHENEVER NOT SUCCESSFUL;
    And the sessionid column in BSOA has height balanced histogram.
    When i create an index i get the following error. As i am on 10g I can't use DDL_LOCK_TIMEOUT . I may have to wait for next down time.
    SQL> CREATE INDEX B2.BSOA_SESSID_I ON B2.BSOA(SESSION_ID) TABLESPACE B2 COMPUTE STATISTICS;
    CREATE INDEX B2.BSOA_SESSID_I ON B2.BSOA(SESSION_ID) TABLESPACE B2 COMPUTE STATISTICS
    ERROR at line 1:
    ORA-00054: resource busy and acquire with NOWAIT specified
    Thanks

  • Performance issue - DB 9.2.0.3

    Hi,
    Oracle EBS 11.5.9 with DB 9.2.0.3
    Windows 2003.
    Suddenly we are facing performance issue. All concurrent programs started taking long time and even there is slow performance in overall application.
    How i can start diagnostic/ troubleshooting ??
    Any path/guidelines, which i can follow.
    Regards

    Do you run the following concurrent programs on regular basis?
    - Gather Schema Statistics
    - Purge Concurrent Request and/or Manager Data
    How many rows you have in the FND_CONCURRENT_PROCESSES and FND_CONCURRENT_REQUESTS tables? Make sure it does in exceed 50K by running the purge concurrent program.
    Verify that you have no errors in the alert_<SID>.log file.
    I would also suggest you review the following notes:
    Note: 169935.1 - Troubleshooting Oracle Applications Performance Issues
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=169935.1
    Note: 244040.1 - Oracle E-Business Suite Recommended Performance Patches
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=244040.1
    Note: 216205.1 - Database Initialization Parameters for Oracle Applications Release 11i
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=216205.1
    Note: 117648.1 - Troubleshooting Performance Issues in Oracle Applications/ E-Business Suite
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=117648.1

  • Resize performance issue

    I have a wierd performance issue.  My application consists of a lot of Panels, VBoxes, and other containers which all have widths that are bound to the main Application's width using equations such as
    <Panel width="100%">
         <VBox width="{width * someRatio}" />
         <VBox width="{width * (1 - someRatio) - 10}"/>
    </Panel>
    Now when I resize the application by expanding the width to the right, the performance isnt too noticable.  But if I shorten the width by dragging to the left, then the program bogs down while the Panel's and VBox's slowly crawl to the left.  Does this have something to do with motion tweening?  Does anyone have some advice I can use to make my resizing more snappy?  This is a business application, so smooth pretty motion comes a distant second to snappy responsiveness.

    Try running it in the profiler to see what is going on.  For sure, if you make it small enough the containers will have to try to put up scrollbars and what not so there will be more work to do.
    You might also benefit from using constraintColumns instead of your binding expressions.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Socket based application - Performance Issues - Suggestions Needed

    Hi All,
    We have an application which basically has been developed using core java. Here is a high level information about the application:
    a) It opens a serversocket which allows clients to connect to it.
    b) For every new client connection, a separate thread is created and this thread deals with requests from clients, processing the data and replying back to clients.
    c) Each socket is polled continuously and sockettimeout is 2 seconds. If there is a timeout, we handle the situation and socket is again read. So basically sockets is read every 2 seconds. If number of timeouts reaches a configurable value, we close the connection and thread is dropped as well.
    d) In production, three instances of this application are running with the help of a cisco load balancer. It is there for last 5 years.
    However there has always been some minor performance isssues and we have sorted them out using different types of garbage collectors, by introducing hardware load balancers, upgrading the code for new Java versions. It is currently running on 1.4.2.
    However there has always been some performance issues and today while googling over internet I came across following on the bea website which says that core java sockets are not as efficients as native API. BEA has implemented its own APIs for weblogic. My queries are:
    a) Are there any better Java Socket/network API (for solairs, I know Java is plateform independenet but there could be lib which also using native libs) which are much more efficient than Core Java.
    b) We are getting the InputStream/OutputStream and creating objects of DataInputStream/DataOutputStream to read the data 'Byte-By-Byte'. Each byte can have different information thats why it is required. Are there any better way of getting info than what we are currently doing.
    c) As I mentioned, we are continously polling the socket for read operation with a timeout value of 2 seconds. What is the better among the following from performance point of view: (1) Frequent read operation with a lesser timeout value or (2) Less Frequent read operations with larger timeout value. (3) Any better idea??
    Please suggest few things or pointers which I could do to improve the performance of the applcations. Many thanks.
    Thanks,Akhil
    From BEA website:-
    "Although the pure-Java implementation of socket reader threads is a reliable and portable method of peer-to-peer communication, it does not provide the best performance for heavy-duty socket usage in a WebLogic Server cluster. With pure-Java socket readers, threads must actively poll all opened sockets to determine if they contain data to read. In other words, socket reader threads are always "busy" polling sockets, even if the sockets have no data to read. This unnecessary overhead can reduce performance."

    My recommendations:
    - Always use a BufferedInputStream and BufferedOutputStream around the socket streams
    - Increase the socket send and receive buffers to at least 32k if you are on a Windows platform where the default is a ridiculous 8k, which hasn't been enough for about 15 years.
    - Your 2-second timeout is far too short. Increase it to at least 10 seconds.
    - Your strategy of counting up to N short timeouts of S seconds each is completely pointless. Change it to one single timeout of N*S seconds. There is nothing to be gained by the complication you have introduced to this.

Maybe you are looking for

  • Best iCloud setup when I have two apple ID's

    Ok so I have two apple ID's---One is a yahoo email address, and that is what I began using forever ago with iTunes, so I have a bunch of purchased music and apps with that username. Since that is my ITUNES username, that is what my iphone has been se

  • Packing specifications at Delivery

    Hi Plz guide me how to maintain packing specification or packing materials at delivery ..... so that i can enter material specification against each item  ....thnx

  • Error Design Studio - I can not open the DB anymore

    Dear All I am facing a big issue with Design Studio I was working on a DB and suddenly I can not see it . I can open it and see outline , DSs properties but I can not see the preview . I get the error below. I have no idea what happens - I get no err

  • Copying view to the same component is not working

    Hi Experts, I have a requirement to split the Installed Base Hierarchy view (IBHIER/TreeEnhanced) into two parts. Each of these parts will show a specific number of levels in the Installed base hierarchy. So I was trying to copy the standard IBHIER/T

  • Pls advice me for IPad 2

    I looking for Ipad2 +  wifi version+  3G + 32GB. If i would like to booking, How i can do that. I am being in Thailand. How long shipment date ? It will be ship out at singapore or somewhere to close Thailand. Please kindly advice me. Could I have di