Help ! Swing Performance tuning

Hi All
what if I go on adding n number of components to the same location of a container without removing the previouly added component to the same location? the component count goes on increasing obviously but is there any performance issue when I remove the earlier one and then add the new one to it?
e.g. If my JFrame contains one center JPanel and after every 10 seconds i want to change the center panel. If i just do it by setting earlier panel to visible false and add new panel to the center won't it increase the size of component list maintained by the container? does removing earlier component add then adding new one give better results over this?
Shailesh

Shure you get better performance, when removing not-used panels. Furthermore, swing-panels are very memory-consuming.

Similar Messages

  • Need help in Performance tuning for function...

    Hi all,
    I am using the below algorithm for calculating the Luhn Alogorithm to calculate the 15th luhn digit for an IMEI (Phone Sim Card).
    But the below function is taking about 6 min for 5 million records. I had 170 million records in a table want to calculate the luhn digit for all of them which might take up to 4-5 hours.Please help me performance tuning (better way or better logic for luhn calculation) to the below function.
    A wikipedia link is provided for the luhn algorithm below
    Create or Replace FUNCTION AddLuhnToIMEI (LuhnPrimitive VARCHAR2)
          RETURN VARCHAR2
       AS
          Index_no     NUMBER (2) := LENGTH (LuhnPrimitive);
          Multiplier   NUMBER (1) := 2;
          Total_Sum    NUMBER (4) := 0;
          Plus         NUMBER (2);
          ReturnLuhn   VARCHAR2 (25);
       BEGIN
          WHILE Index_no >= 1
          LOOP
             Plus       := Multiplier * (TO_NUMBER (SUBSTR (LuhnPrimitive, Index_no, 1)));
             Multiplier := (3 - Multiplier);
             Total_Sum  := Total_Sum + TO_NUMBER (TRUNC ( (Plus / 10))) + MOD (Plus, 10);
             Index_no   := Index_no - 1;
          END LOOP;
          ReturnLuhn := LuhnPrimitive || CASE
                                             WHEN MOD (Total_Sum, 10) = 0 THEN '0'
                                             ELSE TO_CHAR (10 - MOD (Total_Sum, 10))
                                         END;
          RETURN ReturnLuhn;
       EXCEPTION
          WHEN OTHERS
          THEN
             RETURN (LuhnPrimitive);
       END AddLuhnToIMEI;
    http://en.wikipedia.org/wiki/Luhn_algorithmAny sort of help is much appreciated....
    Thanks
    Rede

    There is a not needed to_number function in it. TRUNC will already return a number.
    Also the MOD function can be avoided at some steps. Since multiplying by 2 will never be higher then 18 you can speed up the calculation with this.
    create or replace
    FUNCTION AddLuhnToIMEI_fast (LuhnPrimitive VARCHAR2)
          RETURN VARCHAR2
       AS
          Index_no     pls_Integer;
          Multiplier   pls_Integer := 2;
          Total_Sum    pls_Integer := 0;
          Plus         pls_Integer;
          rest         pls_integer;
          ReturnLuhn   VARCHAR2 (25);
       BEGIN
          for Index_no in reverse 1..LENGTH (LuhnPrimitive) LOOP
             Plus       := Multiplier * TO_NUMBER (SUBSTR (LuhnPrimitive, Index_no, 1));
             Multiplier := 3 - Multiplier;
             if Plus < 10 then
                Total_Sum  := Total_Sum + Plus ;
             else
                Total_Sum  := Total_Sum + Plus - 9;
             end if;  
          END LOOP;
          rest := MOD (Total_Sum, 10);
          ReturnLuhn := LuhnPrimitive || CASE WHEN rest = 0 THEN '0' ELSE TO_CHAR (10 - rest) END;
          RETURN ReturnLuhn;
       END AddLuhnToIMEI_fast;
    /My tests gave an improvement for about 40%.
    The next step to try could be to use native complilation on this function. This can give an additional big boost.
    Edited by: Sven W. on Mar 9, 2011 8:11 PM

  • Very urgent-----help in performance tuning

    hai all,
    I had used inner join for getting data from 5 tables.
    performance is very low in this case.
    now i want to increase the performance. how can i do this.
    coding for the select statement is ......
    SELECT agpnr bname1 bname2 bpstlz bort01 bstras b~street2
               bname1_maco bname2_maco baliasname bispadrbsnd
        INTO CORRESPONDING FIELDS OF TABLE it_tab
        FROM jgtgpnr AS a
        INNER JOIN jgtsadr AS b ON
        aadrnr = badrnr
        INNER JOIN jjtvm AS c ON
        agpnr = ckunnr
        INNER JOIN kna1 AS k ON
        agpnr = kkunnr
        INNER JOIN knvv AS v ON
        agpnr = vkunnr
        WHERE ( ajktokd = 'MADV' OR ajktokd = 'MADO' )
        AND c~vkorg = pr_vkorg
        AND v~vkorg = pr_vkorg
        AND gpnr IN so_gpnr
        AND k~aufsd IN so_block
        AND v~aufsd IN so_blck
    please give me a good suggesstion for this.
    thanks in advance.

    Hi
    Try to use for all entries
    Eg
    if u have itab1 and itab2.
          select vbeln netwr from vbak into table itab1.
          if not itab1[] is initial
          select vbeln matnr matkl from vbap into table itab2
          for all entries in itab1 where vbeln = itab1-vbeln.
          endif.
      Hope this will help u.
    regards
    P.Thangaraj

  • Pls help in performance tuning SQL

    Hi All,
    Can someone please help me to tune this quesry. Rt now it is takin 20 mins tro retuns 80,000 rows and its using dblink
    SELECT COUNT(*) FROM
    (SELECT /*+driving_site(main)*/CORP_ACTG_PRD_YEAR,
    CORP_ACTG_PRD_NBR,
    FCN_CODE,
    LOCAL_CRNC_CODE,
    GL_LOCAL_AMT,
    CORP_ID,
    PGRD_COST_CTR_ID,
    MAJOR_CODE,
    EXP_MINOR_CODE,
    PGRD_EXP_CODE,
    PGRD_EXP_DESC,
    DIV_CODE,
    MKT_CODE,
    PROD_CODE,
    PGRD_PROJECT_CODE,
    PGRD_PROJ_SHORT_DESC
    FROM --#GifDBLink# main,
    [email protected] main,
    select actg_prd_year, actg_prd_nbr from DM_GIF_ESSBASE_CTRL
    where cur_prd_ind='Y' and src_id=84
    union
    select decode(actg_prd_nbr,1,actg_prd_year-1,actg_prd_year) actg_prd_year,
    decode(actg_prd_nbr,1,12,actg_prd_nbr-1) actg_prd_nbr
    from DM_GIF_ESSBASE_CTRL
    where cur_prd_ind='Y' and src_id=84
    union
    select decode(actg_prd_nbr,12,actg_prd_year+1,actg_prd_year) actg_prd_year,
    decode(actg_prd_nbr,12,1,actg_prd_nbr+1) actg_prd_nbr
    from DM_GIF_ESSBASE_CTRL
    where cur_prd_ind='Y' and src_id=84 ) minor
    where main.CORP_ACTG_PRD_YEAR = minor.actg_prd_year
    and main.CORP_ACTG_PRD_NBR = minor.actg_prd_nbr) T;

    user13365939 wrote:
    anyone?Incorrect.
    You are only one who can provide the information that was requested in this thread.
    Please see the FAQ, read the instructions and provide the necessary information.
    Re: 3. How to  improve the performance of my query? / My query is running slow.

  • Need help in Performance tuning

    Hi All,
            I am facing some performance issues in my program.  The program taking a hell lot of time to execute and some times timing out without giving the out put.  This is a report program with ALV output.  It is handling mainly Sales related data.
           The program is fetching a huge volume of data from different tables and processing this bulk data inside the loops several times.  In most of the queries I am unable to supply all key fields, because my requirement is like that only.  I have many places in my program i am using inner loop and function modules inside loop etc.
            Any pointers on this will be a great help.
    Regards,
    Jijeesh P G

    1) Make sure that any READ or LOOP inside an outer LOOP accesses the inner table with an appropriate key (either using BINARY search when reading a standard table or using sorted/hashed tables for inner tables only). This helps in most cases.
    2) If the tables witdh is more than aprox. 30 bytes LOOP ASSIGNING <wa> may help a bit. Declare <wa> for each table separately using the tables line type (otherway type casting would cost some additional time).
    3) You may use FM SAPGUI_PROGRESS_INDICATOR in the outer loops to inform the user while he is waiting.
    4) A COMMIT from time to time will reset the measured time for timeout ( and therefore avoids timeouts - do NOT use without checking step 1) ).
    4) The programm may use virtual memory if a huge amount of data is selected ( I have seen dumps in due to the fact that nor more disk space was available). So  - if STEPS 1)-3) failed - look a the process for rollling in/out).

  • Need help with Performance Tuning

    Following query takes 8 secs. Any help will be appreciated
    SELECT SUM(FuturesMarketVal) FuturesMarketVal
    FROM (SELECT CASE WHEN null IS NULL THEN FuturesMarketVal
    ELSE DECODE(FUTURES_NAME, null, FuturesMarketVal, 0)
    END FuturesMarketVal
    FROM (SELECT SUM( (a.FUTURES_ALLOC * (NVL(b.Futures_EOD_Price,0)/100 - NVL(c.Futures_EOD_Price,0)/100) * a.CONTRACT_SIZE) / DECODE(a.CONTRACT_SIZE,100000,1,1000000,4,3000000,12,1) ) FuturesMarketVal,
    a.FUTURES_NAME
    FROM cms_futures_trans a,
    cms_futures_price b,
    cms_futures_price c
              Where c.history_date (+) = TO_DATE(fas_pas_pkg.get_weekday(to_date('12/30/2005') - 1),'mm/dd/yyyy')
              and a.FUTURES_NAME = b.FUTURES_NAME (+)
    AND a.trade_date < TO_DATE('12/30/2005','mm/dd/yyyy')
    AND b.history_date (+) = TO_DATE('12/30/2005','mm/dd/yyyy')
    AND a.FUTURES_NAME = c.FUTURES_NAME (+)
    GROUP BY a.FUTURES_NAME
    /

    Eric:
    But there are only 5 records in cms_futures_price and 10 in cms_futures_trans :-)
    OP:
    I'm not usre what you are trying to fo here, but a couple of comments.
    Since NULL IS NULL will always be true, you don;t really need the CASE statement. as it stands, your query will always return FuturesMarketVal. If the results are correct, then you can do without the DECODE as well.
    Why are you calling fas_pas_pkg.get_weekday with a constant value? Can you not just use whatever it returns as a constant instead of calling the function?
    Are you sure you need all those outer joins? They almost guarantee full scans of the outer joined tables.
    Perhaps if you post some representative data from the two tables and an explanation of what you are trying to accomplish someone may have a better idea.
    John

  • Help needed in tuning a query

    Hi,
    I need some help in performing tuning of a big query. Explain plan is as under:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    Edited by: AbdulHadi on Sep 16, 2011 3:56 PM
    Edited by: AHadi on Sep 19, 2011 10:02 AM

    3     SORT GROUP BY          47916     25M     491G     15M (3)     17:30:31               
    4     VIEW          870M     445G          15M (2)     17:24:08               
    5     HASH GROUP BY          870M     427G     885G     15M (2)     17:24:08               
    In above steps its using very high temporary tablespace usage. please try to tune your query.
    - dynamic sampling used for this statement
    The statistics appears to be stale.

  • Steps for performance Tuning....!!!!

    Hi all,
    I need your help in Performance tuning.
    While we do tuning in Oracle, apart from Indexes, where clause and order by clause, what are the other points we need to check. I mean explain plan etc...
    I am working as Informatica Developer, but i need to make an documents which points out what are the step we can check while doing performance tuning on SQL queries.
    Thanks in advance for your help.

    Hi,
    have a look into these link.it may helpful to you.
    When your query takes too long .
    When your query takes too long ...
    * HOW TO Post a SQL statement tuning request template posting *
    HOW TO: Post a SQL statement tuning request - template posting
    Edited by: Ravi291283 on Jul 28, 2009 4:00 AM
    Edited by: Ravi291283 on Jul 28, 2009 4:01 AM
    Edited by: Ravi291283 on Jul 28, 2009 4:02 AM

  • Performance tuning help

    hello friends,
    i am supposed to use ST05 and SE30 to do performance tuning,and also perform cost estimation,
    can some plz help me understand, i am not that good at reading large paragraphs, so plz donot give me links to help.sap
    thank you.

    Hi
    Se30  is the runtime analysis
    Here it will give you detailed graph about your program .
    abap time,database time application time ..
    st05 is sql trace where it will give you individual select stmnts in your program
    and also proper index is being used or not.
    Other performance tips
    check any select stmnts inside the loop and replace with read statement
    use binary search in read stmnts
    use proper index in where condition in select stmnt.
    if you want to execute st05..go st05..trace on-execute ur program--come to st05..trace off and --list trace...
    you get summary details of select queires and it will be pink or other color.
    Thanks

  • Help request for Oracle DB Performance tuning

    I need some help on Oracle performance tuning.
    My environment is VB 6 frontend & Oracle 8
    in backend.
    The problem I am facing is particularly in
    muli-user environment. Some query which takes
    20 seconds to when there is only one user
    working in the network, takes more time
    (3 minutes to even 5 minutes) when there are
    4-5 users working in the network.
    What may be wrong ?
    Are there any parameters that I can
    fine tune ?
    We checked the resource utilization at the
    server level CPU utilization is max 50 %,
    Memoery utilization is 50 % (250 MB out of available 512 KB)
    null

    Hi Vinay,
    There can be many reasons for time delay.
    Here are some--
    1) You may not be releasing the locks on objects quickly after use.
    This can be obtained by querying v$locked_object.
    2) You may be holding many sessions concurrently and not closing the older ones.
    This u can get by querying v$session.
    These are some common problems in multi-user platform.
    R u using MTS?
    Yogesh.

  • CF Performance Tuning Help

    I moved our internal application from a P3 500mhz CPU 1U
    server to a Duo-Core Xeon 1.6ghz server.
    The newer box has a larger HD, more RAM, beefier CPU, yet my
    application is running at the same or a smidgen faster than the old
    server. Oh, I went from a Win2k, IIS 5.0 box to a Windows Server
    2003 running IIS 6, mysql 5.0.
    I did a Windows Performance Monitor look-see. I added all the
    CF services and watched the graphs do their thing. I noticed that
    after I ran query on my application, the jrun service Avg. Req Time
    is pinned at 100%. Even several minutes after inactivity on the
    box, this process is still at 100%. Anyone know if this is a
    causing my performance woes? Anyone know what else I can look at to
    increase the speed of the app (barring and serious code rebuild)?
    Thanks!
    chris

    Anyone know what else I can look at to increase the speed of
    the app
    (barring and serious code rebuild)?
    There are some tweaks and tips, but I will let more knowledge
    folks
    speak to these. But I am afraid you problem maybe a code
    issue. From
    the brief description I would be concerned there is some kind
    of memory
    leak thing happening in your code and until you track it down
    and plug
    it up, no amount of memory or performance tuning is going to
    do you much
    good.

  • Report running for long time & performance tuning

    Hi All,
    (1). WebI report is running for long time.so what are the steps i need to check for it ?
    (2). Can you tell me about performance tuning in BO ?
    please help me.....
    Thanks
    Kumar

    (1). WebI report is running for long time.so what are the steps i need to check for it ?
    The first step is to see if the problem lies in the query on the data source or in webi itself. Depending on the data source there are different ways to extract the query and try to run it against the database. Which source does your report uses?
    (2). Can you tell me about performance tuning in BO ?
    I would recommend to start by reading the administrator's guide. There is a section about how to improve performance.
    Regards,
    Stratos

  • Performance tuning of BPEL processes in SOA Suite 11g

    Hi,
      We are working with a customer for performance tuning of SOA Suite 11g, one of the areas is to tune the BPEL processes. I am new to this and started out with stress testing Hello World process using SOAPUI tool. I would like help with the below topics -
    1. How do I interpret the statistics collected during stress testing? Do we have any benchmark set that can indicate that the performance is ok.
    2. Do we need to run stress tests for every BPEL process deployed?
    2. Is there any performance tuning strategy documentation available? Or can anybody share his/her experiences to guide me?
    Thanks in advance!
    Sritama

    1. How do I interpret the statistics collected during stress testing? Do we have any benchmark set that can indicate that the performance is ok.
    You need
    pay attention to:
    java heap usage vs java heap capacity
    java eden usage vs java eden capacity
    JDBC pool initial connections vs JDBC pool capacity connections
    if you are using linux: top
    if you are using aix: topas
    2. Do we need to run stress tests for every BPEL process deployed?
    yes, you need test each BPEL. You can use "Jmeter" tool.
    Download Jmeter from here: Apache JMeter - Apache JMeter&amp;trade;
    Other tools:
    jstat
    jstack
    jps -v
    Enterprise Manager
    WebLogic Console
    VisualVM
    JRockit Mission Control
    3. Is there any performance tuning strategy documentation available? Or can anybody share his/her experiences to guide me?
    I recommend "Oracle SOA Suite 11g Performance Tuning Cookbook" http://www.amazon.com/Oracle-Suite-Performance-Tuning-Cookbook/dp/1849688842/ref=sr_1_1?ie=UTF8&qid=1378482031&sr=8-1&keywords=oracle+soa+suite+11g+performance+tuning+cookbook

  • Performance tuning related issues

    hi experts
      i am new to performance tuning application. can any one share some stuff(bw3.5& bi7)related to the concern area.send any relavent docs to my id: [email protected] .
      thanks in advance
    regards
    gavaskar
    [email protected]

    hi Gavaskar,
    check this, you can download lot of performance materials
    Business Intelligence Performance Tuning [original link is broken]
    and e-learning -> intermediate course and advance course
    https://www.sdn.sap.com/irj/sdn/developerareas/bi?rid=/webcontent/uuid/fe5b0b5e-0501-0010-cd88-c871915ec3bf [original link is broken]
    e.g
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/10b589ad-0701-0010-0299-e5c282b7aaad
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/d9fd84ad-0701-0010-d9a5-ba726caa585d
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/8e6183ad-0701-0010-e083-9ab1c6afe6f2
    performance tools in bw 3.5
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/07a4f070-0701-0010-3b91-a6bf7644c98f
    (here also you can download the presentation by righ click the disk drive icon)
    hope this helps.

  • [ADF-11.1.2] Proof of view performance tuning in oracle adf

    Hello,
    Take an example of : http://www.gebs.ro/blog/oracle/adf-view-object-performance-tuning-analysis/
    It tells me perfectly how to tune VO to achieve performance, but how to see it working ?
    For example: I Set Fetch size of 25, 'in Batch of' set to 1 or 26 I see following SQL Statement in Log
    [1028] SELECT Company.COMPANY_ID,         Company.CREATED_DATE,         Company.CREATED_BY,         Company.LAST_MODIFY_DATE,         Company.LAST_MODIFY_BY,         Company.NAME FROM COMPANY Companyas if it is fetching all the records from table at a time no matter what's the size of Batch. If I am seeing 50 records on UI at a time, then I would expect at least 2 SELECT statement fetching 26 records by each statement if I set Batch Size to 26... OR at least 50 SELECT statement for Batch size set to '1'.
    Please tell me how to see view performance tuning working ? How one can say that setting batch size = '1' is bad for performance?

    Anandsagar,
    why don't you just read up on http://download.oracle.com/docs/cd/E21764_01/core.1111/e10108/adf.htm#CIHHGADG
    there are more factors influencing performance than just query. Btw, indexing your queries also helps to tune performance
    Frank

Maybe you are looking for

  • TIME_OUT error while executing an ABAP report

    Hi All, I have an ABAP report in which the code looks like below LOOP AT pernr_tab . " *Internal table consists of  around 25k records*     IF last_run_date IS INITIAL. " Initial Load       PERFORM fill_data USING pernr_tab-pernr last_run_date CHANGI

  • Number that does not want to be formatted

    Hello, I have a problem. If someone can help me, please. JDeveloper 10.1.3 I have a column defined via DB-function in VO: BTW_BEDR_REG_HOOG I need to put it on my page with the format "#,## 0.00" select IFR.ID , DMR_IFL_200.myfunction (IFR.ID) BTW_BE

  • Cannot drag music into playlists or move them in playlists

    So I just downloaded a cd from itunes and i went to make a playlist, but when i tried to drag the songs into the playlist, it wouldn't let me. So I went to some other playlists I had and tried to move the songs around in there, but it wouldn't let me

  • Using Back button issue for radio button

    Dear All, My initial screen has 2 radio buttons, on selecting will take to a selection screen with few fields, i have enabled the back button using MODULE user_command AT EXIT-COMMAND.   when i select a Radio Button 1 which takes to the Selection Scr

  • Help on iphone purchase please

    I am thinking about buying an iphone and I have been reviewing for about 2 weeks now and I have read just about every good and bad review I could find. I think that it has what I need as far as functionality especially since we don't have 3g in my ar