Reducing Rendering time with JTable

Hi,
Currently I have an application which builds a JTable from a fetched database resultset. The resultset contains a date field, which is shown in the JTable as well. I roughly have 100,000 records which are placed in the JTable.
Now for the problem. I have a custom renderer which renders each row in a specific font and a black foreground colour. However, when the date field is in the future the row should have a grey foreground colour. My application does this perfectly, however the loading time is extremely long in comparison with not doing this check.
The reason for this lies at the renderer. After the database has fetched he records, my application checks which records are in the future and builds a list. This list contains the rows that should be coloured grey. Building this list takes a long time though since every row has to be checked. Is there a way to make this more efficient? To sum it up, this is what happends:
*Database fetches all records
*Application checks which rows are in the future
*Application builds a "future"-list, containing the rownumber which row should be coloured grey.
*The list gets passed to the renderer
*The renderer checks if the "future"-list contains the rownumber.  (intensive operation, this is where most processing time goes)
*If the list contains the number the row is coloured grey. Otherwise the row is coloured black.
Thanks

First read camicker's column, he's got good and solid knowledge, and I don't want to get into it with him again. Once you get your renderer fixed, what are you going to do about your TableModel. Are you using AbstractTableModel or DefaultTableModel and why. Your project requires some thought about this data storage too.
Note: You may incorporate into your app SQL and a ResutSet to only select certain rows of data to begin with, instead of retrieving all records all the time. I mean... since you are using a database?
Edited by: pierrot_2 on Feb 21, 2009 11:35 AM

Similar Messages

  • How to reduce rendering time.

    Hi
    I have a couple of questions-
    1. When i am rendering an hd video pal format, it takes on an average 3.5 hours to render it. This is through encore as well as premiere? How do i reduce rendering time?
    2. Second issue is how do i tranfer an open project from 1 computer to the other, since the data is on the hard disk of the first, and there are chances of it getting lost?
    3. When i try converting a pal HD video to ntsc in encore, it doesnt take the frame size. So i have to export it in ntsc in premiere then make the title in encore and then render it again. Takes too long, any way of shortening the process?
    4. How to make dvd copies from a rendered HD project?

    export settings, film size 1440x1080i
    computer specifications 8gb ram, windows 7 (64bit), fx series amd...
    for 01- what would you recommend?  i have a budget constraint that i cannot exceed 3000$
    02- could you elaborate as to how i can copy? i am using a cat 6 network cables between my systems.
    03- when i export it in encore, in the encore export setting there all these otions, based upon frame rate, when i choose the ntsc option, it still takes the default pal option, and doesnt accept the ntsc. So to counter that i have to go back to premiere, export it in ntsc and then make the final output in encore. so it takes 3 hours first to convert to ntsc and then another 3 hours when rendering through encore. i know my process is wrong, what do i do?
    04- any link where i can see it. our time line in bluray is 2 hours, to mantain quality you would need to split that rather than convert the 2 hour project to dvd. i think that is my question, how can you split the bluray project over two dvd's
    thanks for your reply

  • Insanely long rendering time with premiere CC

    My config : Hp pavilion dv 7
    i7 2GHZ
    ATI radeon 2Ghz
    8Giga ram
    So i'm trying the free trial version of premiere CC and it takes me about 4 hours of rendering a 24 minutes long video. In h.264  hd720P (only 2 video tracks and 2 audio tracks). Before that i used premiere cs 6 and it was quite long too but not that much (around 50 minutes for the same settings), what is up with that ?!
    edit : It's also imossible to watch the preview window because of the insane lag even if i reduce the quality of the previsulisation.(1/4) or the size of it (10%), it's impossible to work properly.

    Well software and programming and computers are definitly some magic world...with fairies and witches...yesterday morning i tried again and...it was working..perfecty....30 min rendering for a 20 min long project....i did nothing special...just tried pinnacle studio...i guess premiere sensed it Seriously i have NO IDEA what happened, thank you anyway.

  • Reduce execution time with selects

    Hi,
    I have to reduce the execution time in a report, most of the consumed time is in the select query.
    I have a table, gt_result:
    DATA: BEGIN OF gwa_result,
          tknum            LIKE vttk-tknum,
          stabf            LIKE vttk-stabf,
          shtyp            LIKE vttk-shtyp,
          route            LIKE vttk-route,
          vsart            LIKE vttk-vsart,
          signi            LIKE vttk-signi,
          dtabf            LIKE vttk-dtabf,
          vbeln            LIKE likp-vbeln,
          /bshm/le_nr_cust LIKE likp-/bshm/le_nr_cust,
          vkorg            LIKE likp-vkorg,
          werks            LIKE likp-werks,
          regio            LIKE kna1-regio,
          land1            LIKE kna1-land1,
          xegld            LIKE t005-xegld,
          intca            LIKE t005-intca,
          bezei            LIKE tvrot-bezei,
          bezei1           LIKE t173t-bezei,
          fecha(10) type c.
    DATA: END OF gwa_result.
    DATA: gt_result LIKE STANDARD TABLE OF gwa_result.
    And the select query is this:
      SELECT ktknum kstabf kshtyp kroute kvsart ksigni
    k~dtabf
             lvbeln l/bshm/le_nr_cust lvkorg lwerks   nregio nland1 oxegld ointca
                 tbezei   ttbezei
      FROM vttk AS k
      INNER JOIN vttp  AS p ON ktknum = ptknum
      INNER JOIN likp  AS l ON pvbeln = lvbeln
      INNER JOIN kna1  AS n ON lkunnr = nkunnr
      INNER JOIN t005  AS o ON nland1 = oland1
      INNER JOIN tvrot AS t ON troute = kroute AND t~spras = sy-langu
      INNER JOIN t173t AS tt ON ttvsart = kvsart AND tt~spras = sy-langu
      INTO TABLE gt_result
      WHERE ktknum IN s_tknum AND ktplst IN s_tplst AND k~route IN s_route AND
         k~erdat BETWEEN s_erdat-low AND s_erdat-high AND
         l~/bshm/le_nr_cust <> ' '    "IS NOT NULL
         AND k~stabf = 'X'
         AND ktknum NOT IN ( SELECT tktknum  FROM vttk AS tk
                             INNER JOIN vttp AS tp ON tktknum = tptknum
                             INNER JOIN likp AS tl ON tpvbeln = tlvbeln
                             WHERE l~/bshm/le_nr_cust IS NULL )
         AND k~tknum NOT IN ( SELECT tknum FROM /bshs/ssm_eship )
         AND ( o~xegld = ' '
               OR ( o~xegld = 'X' AND
                    ( ( n~land1 = 'ES'
                        AND ( nregio = '51' OR nregio = '52'
                              OR nregio =  '35' OR nregio =  '38' ) )
                               OR n~land1 = 'ESC' ) )
                      OR ointca = 'AD' OR ointca = 'GI' ).
    Does somebody know how to reduce the execution time ?.
    Thanks.

    Hi,
    Try to remove the join. Use seperate selects as shown in example below and for the sake of selection, keep some key fields in your internal table.
    Then once your final table is created, you can copy the table into GT_FINAL which will contain only fields you need.
    EX
    data : begin of it_likp occurs 0,
             vbeln like likp-vbeln,
             /bshm/le_nr_cust like likp-/bshm/le_nr_cust,
             vkorg like likp-vkorg,
             werks like likp-werks,
             kunnr likr likp-kunnr,
           end of it_likp.
    data : begin of it_kna1 occurs 0,
           kunnr like...
           regio....
           land1...
          end  of it_kna1 occurs 0,
    Select tknum stabf shtyp route vsart signi dtabf
    from VTTP
    into table gt_result
    WHERE tknum IN s_tknum AND
          tplst IN s_tplst AND
          route IN s_route AND
          erdat BETWEEN s_erdat-low AND s_erdat-high.
    select vbeln /bshm/le_nr_cust
           vkorg werks kunnr
           from likp
           into table it_likp
           for all entries in gt_result
           where vbeln = gt_result-vbeln.
    select kunnr
           regio
           land1
           from kna1
           into it_kna1
           for all entries in it_likp.
    similarly for other tables.
    Then loop at gt result and read corresponding table and populate entire record :
    loop at gt_result.
    read table it_likp where vbeln = gt_result-vbeln.
    if sy-subrc eq 0.
      move corresponding fields of it_likp into gt_result.
      gt_result-kunnr = it_likp-kunnr.
      modify gt_result.
    endif.
    read table it_kna1 where kunnr = gt_result-vbeln.
    if sy-subrc eq 0.
      gt_result-regio = it-kna1-regio.
      gt_result-land1 = it-kna1-land1.
      modify gt_result.
    endif.
    endloop.

  • Reduce render time with wizard design pattern

    I am making a long, complex interactive dynamic form. How do I make the form so that only the page/section the user is working on is visible and renders?

    You could create pure virtual class that defines your test step API. Methods for the class would consist of things like setup, teardown, execute to name a few. Your developers could use this base class as the template and API for their tests. The methods regulate the format of the data exchange between your engine and their test. I would also recommend that you use packed libraries so that your test steps are basically plugins. Your test sequence would need to contain the name of the appropriate plugin to use in order to invoke the correct test step. This model is flexible and easy to extend.
    We are actually investigating using this same approach for our test system. Our current system uses TestStand and we are going to investigate TestStand 2012 ability to use dynamic dispatch to invoke our test steps. It should be interesting. We use other features of TestStand so it would be nice if we can make this work. In your case a LabVIEW only implementation should be fairly straightforward.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Long Rendering Time in Premiere Pro with Yosemite

    The rendering time with Yosemite and Premiere Pro CC 2014 is stating hours for a 17  minute video (regardless of small or large file) I recently upgraded to Yosemite (mid project like a dodo-newbie to the editing world).  I also recently installed a Neat video plug in.  Don't know if that has anything to do with it.  Should I revert back to Mavericks?  Or is there something I can do?

    I'M having the same problem, though it's inconsistent.  When I first encoutered the issue it was a simple fix of switching to the Cuda renderer from the open CL/Cuda that is automatically selected.  That little honeymoon lasted a week or so, but now I'll have 4 or 5 clips varying in length from 30 to 120 minutes and invariably one or more will get hung up and require many hours to export.
    Also in the norning after a night of exporting, the ME will indicate the clip was successfully exported, but when the files are checked one or more will not be properly exported.  Generally if I try again the clip will export properly and in a decent amount of time, but sometimes it takes seveeral attempts.
    Add to that that I get dropped frame choppy playback about 70% of the time it becomes a very frustrating program to use professionally.  My drive speeds are good at well over 120Mbs for read and write and this is only 1080/30P material.
    Tried tech support via phone, which was a joke, even though I have received excellent support in the past this episode was not so.  Tech didn't even give me a case number, and I forgot to request one as well, but after remote linking to my machine for an hour in which he was most of the time off the phone, he came back on said he would watch my machine, but was now hanging up.
    Clearly there are issues with this release.  The previous release worked fine.  I just now need to figure out how to go back to the previous version.
    Jim Watt

  • Rendering time

    Hello all,
    I am working in the following way, and would like to know if there is a way to reduce rendering/compression time.
    1. I capture and edit in native HDV.
    2. I have between two to three video channels - one for the video itself, one for show logo, one for full screen images.
    3. The piece is between 5-8 seconds
    4. I use a motion template for the opening sequence that I change once in a while. Every time I change it I render only what's needed rendering
    5. I don't use transitions in 90% of the time - only one or two audio transitions.
    6. In the latest piece I used for the first time, Magic Bullet Looks, and added a spot fill.
    I am exporting video to the web and use AppleTV settings in compressor.
    Render time can take up to two hours, and compressor takes additional hour or so. It is more than in the past (at least subjectively).
    I am editing on Macbook Pro, 2.4Ghz, 256MB graphic card, 4 GB RAM, and the material is on an external Lacie disk, with FW800.
    What am I missing? is there a way to reduce rendering and compression time? Would rendering in ProRes reduce rendering time? Would splicing the images to the video timeline, and by that reducing the amount of video channels, help?
    Any advice will be highly appreciated. I rather not invest money in additional equipment.

    Hi
    Take a look at this article about [Capturing HDV Into ProRes Via FireWire |http://www.kenstone.net/fcphomepage/capture_hdv_prores_fwbalis.html].
    Faster renders is one of the Pros of this workflow.
    Hope that helps !
      Alberto

  • SLOW rendering times

    Hi!
    One of my biggest gripes is the slow rendering times with FCP. I know that it's some setting that I have wrong, but I can't figure it out for the life of me. I started with HD video captures using the ProRes 422 codec, but it would take a REALLY LONG time for it to render.
    For simplistic sake, I started again with just a simple video I took of a screencast. The video is saved using Quicktime in 636x480, HD.264, and a SD (6-1-6) color profile. There is also no sound to the movie...just video. I figured that this would be a really simple way to try some things out, but I was wrong.
    I setup FCP as a number of different codecs and resolutions. I imported the file by just dragging and dropping the .mov video into the Browser in FCP. I then dragged and dropped it to the timeline, and did a render/all.
    Even by doing this, it is taking 8 minutes to render a 2 minute video. There must be something I'm doing wrong, and I can't figure it out. I was watching a youtube FCP demo and this guy rendered a video in about a minute on a g5. Being I have a dual-core intel, I can't imagine it taking as long as it is. I appreciate any help and I know there's a million threads out there...but I just can't seem to grasp this.
    Thanks!

    Hi! I suppose the information below would be helpful. I'd like to get started with a screen capture from Snapz Pro X. Here are some answers to the questions...
    Program: Snapz Pro X Screen Capture v2.2.2
    Record Settings Used:
    - Compression Type: H.264
    - 30 Frames Per Second
    - Key frame every 500 frames
    - Encoding Mode: Single-pass
    - Compressor Quality: Best
    FCP Version: 7.0.2
    Within FCP, this is where I get confused because of all the options.
    In the "Easy Video Setup" portion, I have...
    Format: Apple ProRes 422
    Use: Custom
    - Sequence Preset: DV NTSC 48khz
    - Capture Preset: DV NTSC 48kHz
    - Device Control Preset: Non-Controllable Device
    - Playback Output Video: Digital Cinema Desktop Preview - Main
    - Playback Output Audio: Default
    - Edit to Tape/PTV Output Video: Same as playback
    - Edit to Tape/PTV Output Audio: Same as Playback
    In the "Audio/Video" Settings, I have the following...
    Sequence Preset: DV NTSC 48khz
    Capture Preset: DV NTSC 48khz
    Device Control PReset: Non-controllable device
    Video Playback: Digital cinema desktop preview - main
    Audio Playback: Default
    Sequence Presets: Default settings for DV NTSC 48kHz
    Capture PReset: Default settings for DV NTSC 48kHz
    Device Control: Non-controllable device
    a/v devices: digital cinema desktop preview - main
    - mirror on desktop checked
    - audio: default
    - 'do not show external av device warning' is checked.
    Now, if I right click on the project in the "Browser" window and choose "Sequence Settings", I have the following...
    Frame Size: 640x480 NTSC 4:3
    Pixel Aspect Ratio: NTSC - CCIR 601/DV 720x480
    Field Dominance: None
    Editing Timebase: 29.97
    Quick Time Compressor: H.264
    Quality: 100%
    Audio Rate: 48khz
    Audio Depth: 16 bit
    Audio Config: Channel Grouped
    Video Processing: All grayed out except 'normal' is selected for motion filtering quality.
    ================
    Now, this is where I get really confused with FCP. Everybody says to set it up with the same settings you use to record. Does the "Easy Video Setup" work hand-in-hand with the "Audio/Video Settings"? Should you skip the easy setup and just jump into the A/V Settings?
    WHile typing this message, I also noticed that the "Sequence Presets" in the Audio/Video Settings are set to 720x480 using millions of colors. In the settings for the file in the "Browser" Window, I have it set to 640x480, which is different than what's in the av settings. Should these be the same?
    I'm just getting started with FCP, and these are just the questions I have. What is the 'workflow' one takes to do this? Start FCP, setup the 'audio/video settings' area, choose the preset, edit the sequence preset to something basic, and then drag and drop your mov files in? I suppose it's just confusing because you can set the video settings in FCP, in the 'easy setup', if you right click on the project and choose settings, etc... Which one has precedence over the entire project?
    Sorry for so many questions.
    Thanks in advance...

  • Reducing your implementation time with Configuration Express Wizard

    Dear B1 community,
    recently a new tool has been published on the SDN which may help you to reduce the implementation time of SAP Business One 2005 A SP01.
    It is provided as a non-supported version and you can download it here: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0033074f-9958-2a10-9cb0-ad9f75622b40.
    The package contains: The Configuration Express Wizard, a presentation explaining how to use the tool, and two webex sessions for more details.
    Try it - we are curious on your feedback.
    Regards,
    Markus

    Hi guys
    I've tried all links given here, but none of them are working properly. I've tried saving and opening, but either way I got a corrupted file.
    Is there any other way I can download it?
    I actually have CEW, but I think it is the old version, so I'm getting the following message:
    Wrong digital signature for add-on installer
    I supposed that the new version would fix this, according to this post:
    Reducing your implementation time with Configuration Express Wizard
    Can anyone help? I really needed this to do a presentation on thursday!
    Thanks!!

  • Reducing Render TIme

    Hi All,
    My render times for a 10 minute clip are getting ridiculous ... about an hour.
    I was thinking, what if i change the sequence settings in some way so as to reduce render time between edits? All i want to do at this stage of the game is get a rough idea of how my edits work.
    Once i'm all done i can just reset the sequence settings to where i want them and do a final render prior to export.
    Any ideas of good, quick, sequence settings to get this process moving along?
    Paul

    Your sequence settings should be set to "lower", not none... might have a problem set to none with field order.
    Sounds like your compositing is causing the render times, and the ONLY fix here is to quit compositing. (not a good idea of course) or get thee to a faster mac... Rendering times in any codec or sequence setting are heavily dependant on CPU speed. The faster the machine, the faster the render. You want a lower quality render for editorial? you can change that in the render settings... just don't forget to re render in high quality in the end of course.
    Jerry

  • Reducing Load Times / Design Architecture

    I'm designing a flash site with a Dynamic Gallery (loading images from a XML file). what can I do to reduce load time at the beginning, or limit loading times to individual images?
    I've seen designs which loads another SWF file on top of the current one. Is this feasible?
    Any details would be greatly appreciated.

    If loading the images is the goal of the file, then the quickest way to do that is to concentrate on the images.  Any way you load them, they have to be loaded.  Be sure they are optimized for the web.  If the gallery intent would allow for it, have the images loaded on request, using thumbnails or other button-like interfaces.  Or maybe load different sections at a time.  Or load so many at first, then load the rest in the background so that there's something to look at while the rest load.
    I don't know what purpose you have in mind for loading another swf into the file, so I can't offer any ideas there.

  • How to reduce process time in report

    Hi all..
    Is there any technique to reduce process time in report on programmer side??
    Plz help me...

    Hi
    check this and ensure that your code is as per the stds
    1) Dont use nested select statements
    2) If possible use for all entries in addition
    3) In the where addition make sure you give all the primary key
    4) Use Index for the selection criteria.
    5) You can also use inner joins
    6) You can try to put the data from the first select statement into an Itab and then in order to select the data from the second table use for all entries in.
    7) Use the runtime analysis SE30 and SQL Trace (ST05) to identify the performance and also to identify where the load is heavy, so that you can change the code accordingly
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5d0db4c9-0e01-0010-b68f-9b1408d5f234
    ABAP performance depends upon various factors and in devicded in three parts:
    1. Database
    2. ABAP
    3. System
    Run Any program using SE30 (performance analys) to improve performance refer to tips and trics section of SE30, Always remember that ABAP perfirmance is improved when there is least load on Database.
    u can get an interactive grap in SE30 regarding this with a file.
    also if u find runtime of parts of codes then use :
    Switch on RTA Dynamically within ABAP Code
    *To turn runtim analysis on within ABAP code insert the following code
    SET RUN TIME ANALYZER ON.
    *To turn runtim analysis off within ABAP code insert the following code
    SET RUN TIME ANALYZER OFF.
    Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
    Avoid for all entries in JOINS
    Try to avoid joins and use FOR ALL ENTRIES.
    Try to restrict the joins to 1 level only ie only for tables
    Avoid using Select *.
    Avoid having multiple Selects from the same table in the same object.
    Try to minimize the number of variables to save memory.
    The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
    Avoid creation of index as far as possible
    Avoid operators like <>, > , < & like % in where clause conditions
    Avoid select/select single statements in loops.
    Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.
    Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
    Avoid using ORDER BY in selects
    Avoid Nested Selects
    Avoid Nested Loops of Internal Tables
    Try to use FIELD SYMBOLS.
    Try to avoid into Corresponding Fields of
    Avoid using Select Distinct, Use DELETE ADJACENT
    Check the following Links
    Re: performance tuning
    Re: Performance tuning of program
    http://www.sapgenie.com/abap/performance.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    check the below link
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    See the following link if it's any help:
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Check also http://service.sap.com/performance
    and
    books like
    http://www.sap-press.com/product.cfm?account=&product=H951
    http://www.sap-press.com/product.cfm?account=&product=H973
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Performance tuning for Data Selection Statement
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    Debugger
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    Run Time Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm
    SQL trace
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm
    CATT - Computer Aided Testing Too
    http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm
    Test Workbench
    http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm
    Coverage Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm
    Runtime Monitor
    http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm
    Memory Inspector
    http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm
    ECATT - Extended Computer Aided testing tool.
    http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm
    Just refer to these links...
    performance
    Performance
    Performance Guide
    performance issues...
    Performance Tuning
    Performance issues
    performance tuning
    performance tuning
    You can go to the transaction SE30 to have the runtime analysis of your program.Also try the transaction SCI , which is SAP Code Inspector.
    1 Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
    2 Avoid for all entries in JOINS
    3 Try to avoid joins and use FOR ALL ENTRIES.
    4 Try to restrict the joins to 1 level only ie only for 2 tables
    5 Avoid using Select *.
    6 Avoid having multiple Selects from the same table in the same object.
    7 Try to minimize the number of variables to save memory.
    8 The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
    9 Avoid creation of index as far as possible
    10 Avoid operators like <>, > , < & like % in where clause conditions
    11 Avoid select/select single statements in loops.
    12 Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.
    13 Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
    14 Avoid using ORDER BY in selects
    15 Avoid Nested Selects
    16 Avoid Nested Loops of Internal Tables
    17 Try to use FIELD SYMBOLS.
    18 Try to avoid into Corresponding Fields of
    19 Avoid using Select Distinct, Use DELETE ADJACENT.
    Regards
    Anji

  • How to reduce execution time ?

    Hi friends...
    I have created a report to display vendor opening balances,
    total debit ,total credit , total balance & closing balance for the given date range. it is working fine .But it takes more time to execute . How can I reduce execution time ?
    Plz help me. It's a very urgent report...
    The coding is as below.....
    report  yfiin_rep_vendordetail no standard page heading.
    tables : bsik,bsak,lfb1,lfa1.
    type-pools : slis .
    --TABLE STRUCTURE--
    types : begin of tt_bsik,
            bukrs type bukrs,
            lifnr type lifnr,
            budat type budat,
            augdt type augdt,
            dmbtr type dmbtr,
            wrbtr type wrbtr,
            shkzg type shkzg,
            hkont type hkont,
            bstat type bstat_d ,
            prctr type prctr,
            name1 type name1,
         end of tt_bsik,
         begin of tt_lfb1,
             lifnr type lifnr,
             mindk type mindk,
         end of tt_lfb1,
        begin of tt_lfa1,
            lifnr type lifnr,
            name1 type name1,
            ktokk type ktokk,
        end of tt_lfa1,
        begin of tt_opbal,
            bukrs type bukrs,
            lifnr type lifnr,
            gjahr type gjahr,
            belnr type belnr_d,
            budat type budat,
            bldat type bldat,
            waers type waers,
            dmbtr type dmbtr,
            wrbtr type wrbtr,
            shkzg type shkzg,
            blart type blart,
            monat type monat,
            hkont type hkont,
            bstat type bstat_d ,
            prctr type prctr,
            name1 type name1,
            tdr type  dmbtr,
            tcr type  dmbtr,
            tbal type  dmbtr,
          end of tt_opbal,
         begin of tt_bs ,
            bukrs type bukrs,
            lifnr type lifnr,
            name1 type name1,
            prctr type prctr,
            tbal type dmbtr,
            bala type dmbtr,
            balb type dmbtr,
            balc type dmbtr,
            bald type dmbtr,
            bale type dmbtr,
            gbal type dmbtr,
        end of tt_bs.
    ************WORK AREA DECLARATION *********************
    data :  gs_bsik type tt_bsik,
            gs_bsak type tt_bsik,
            gs_lfb1 type tt_lfb1,
            gs_lfa1 type tt_lfa1,
            gs_ageing  type tt_ageing,
            gs_bs type tt_bs,
            gs_opdisp type tt_bs,
            gs_final type tt_bsik,
            gs_opbal type tt_opbal,
            gs_opfinal type tt_opbal.
    ************INTERNAL TABLE DECLARATION*************
    data :  gt_bsik type standard table of tt_bsik,
            gt_bsak type standard table of tt_bsik,
            gt_lfb1 type standard table of tt_lfb1,
            gt_lfa1 type standard table of tt_lfa1,
            gt_ageing type standard table of tt_ageing,
            gt_bs type standard table of tt_bs,
            gt_opdisp type standard table of tt_bs,
            gt_final type standard table of tt_bsik,
            gt_opbal type standard table of tt_opbal,
            gt_opfinal type standard table of tt_opbal.
    ALV DECLARATIONS *******************
    data : gs_fcat type slis_fieldcat_alv ,
           gt_fcat type slis_t_fieldcat_alv ,
           gs_sort type slis_sortinfo_alv,
           gs_fcats type slis_fieldcat_alv ,
           gt_fcats type slis_t_fieldcat_alv.
    **********global data declration***************
    data :   kb type dmbtr ,
              return like  bapireturn ,
              balancespgli like  bapi3008-bal_sglind,
              noteditems like  bapi3008-ntditms_rq,
              keybalance type table of  bapi3008_3 with header line,
             opbalance type p.
    SELECTION SCREEN DECLARATIONS *********************
    selection-screen begin of block b1 with frame .
    select-options : so_bukrs for bsik-bukrs obligatory,
                     so_lifnr for bsik-lifnr,
                     so_hkont for bsik-hkont,
                     so_prctr for bsik-prctr ,
                     so_mindk for lfb1-mindk,
                     so_ktokk for lfa1-ktokk.
    selection-screen end of block b1.
    selection-screen : begin of block b1 with frame.
    parameters       : p_rb1 radiobutton group rad1 .
    select-options   : so_date for sy-datum .
    selection-screen : end of block b1.
    ********************************ASSIGNING ALV GRID
    ****field catalog for balance report
    gs_fcats-col_pos = 1.
    gs_fcats-fieldname = 'BUKRS'.
    gs_fcats-seltext_m =  text-001.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 2 .
    gs_fcats-fieldname = 'LIFNR'.
    gs_fcats-seltext_m = text-002.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 3.
    gs_fcats-fieldname = 'NAME1'.
    gs_fcats-seltext_m =  text-003.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 4.
    gs_fcats-fieldname = 'BALC'.
    gs_fcats-seltext_m =  text-016.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 5.
    gs_fcats-fieldname = 'BALA'.
    gs_fcats-seltext_m =  text-012.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 6.
    gs_fcats-fieldname = 'BALB'.
    gs_fcats-seltext_m =  text-013.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 7.
    gs_fcats-fieldname = 'TBAL'.
    gs_fcats-seltext_m =  text-014.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 8.
    gs_fcats-fieldname = 'GBAL'.
    gs_fcats-seltext_m =  text-015.
    append gs_fcats to gt_fcats .
    data : repid1 type sy-repid.
    repid1 = sy-repid.
    INITIALIZATION EVENTS ******************************
    initialization.
    *Clearing the work area.
    clear gs_bsik.
    Refreshing the internal tables.
    refresh gt_bsik.
    ******************START OF  SELECTION EVENTS **************************
    start-of-selection.
    *get data for balance report.
      perform sub_openbal.
      perform sub_openbal_display.
    *&      Form  sub_openbal
          text
    -->  p1        text
    <--  p2        text
    form sub_openbal .
      if   so_date-low > sy-datum or so_date-high > sy-datum .
          message i005(yfi02).
         leave screen.
    endif.
         select bukrs lifnr gjahr belnr budat bldat
           waers dmbtr wrbtr shkzg blart monat hkont prctr
           from bsik into table gt_opbal
           where bukrs in so_bukrs and lifnr in so_lifnr
           and hkont in so_hkont and prctr in so_prctr
           and budat in so_date .
        select bukrs lifnr gjahr belnr budat bldat
           waers dmbtr wrbtr shkzg blart monat hkont prctr
           from bsak appending table gt_opbal
           for all entries in gt_opbal
           where lifnr = gt_opbal-lifnr
           and budat in so_date .
    if sy-subrc <> 0.
      message i007(yfi02).
      leave screen.
      endif.
    select lifnr mindk from lfb1 into table gt_lfb1
      for all entries in gt_opbal
        where lifnr = gt_opbal-lifnr and mindk in so_mindk.
    select lifnr name1 ktokk from lfa1 into table gt_lfa1
      for all entries in gt_opbal
       where lifnr = gt_opbal-lifnr and ktokk in so_ktokk.
       loop at gt_opbal into gs_opbal .
         loop at gt_lfb1 into gs_lfb1 where lifnr = gs_opbal-lifnr.
           loop at gt_lfa1 into gs_lfa1 where lifnr = gs_opbal-lifnr.
            gs_opfinal-bukrs = gs_opbal-bukrs.
            gs_opfinal-lifnr = gs_opbal-lifnr.
            gs_opfinal-gjahr = gs_opbal-gjahr.
            gs_opfinal-belnr = gs_opbal-belnr.
            gs_opfinal-budat = gs_opbal-budat.
            gs_opfinal-bldat = gs_opbal-bldat.
            gs_opfinal-waers = gs_opbal-waers.
            gs_opfinal-dmbtr = gs_opbal-dmbtr.
            gs_opfinal-wrbtr = gs_opbal-wrbtr.
            gs_opfinal-shkzg = gs_opbal-shkzg.
            gs_opfinal-blart = gs_opbal-blart.
            gs_opfinal-monat = gs_opbal-monat.
            gs_opfinal-hkont = gs_opbal-hkont.
            gs_opfinal-prctr = gs_opbal-prctr.
            gs_opfinal-name1 = gs_lfa1-name1.
        if gs_opbal-shkzg    = 'H'.
            gs_opfinal-tcr   =  gs_opbal-dmbtr * -1.
            gs_opfinal-tdr   =  '000000'.
        else.
            gs_opfinal-tdr   =  gs_opbal-dmbtr.
            gs_opfinal-tcr   =  '000000'.
        endif.
           append gs_opfinal to gt_opfinal.
           endloop.
           endloop.
           endloop.
    sort gt_opfinal by bukrs lifnr prctr .
    so_date-low = so_date-low - 1 .
    loop at gt_opfinal into gs_opfinal.
    call function 'BAPI_AP_ACC_GETKEYDATEBALANCE'
      exporting
        companycode        = gs_opfinal-bukrs
        vendor             =  gs_opfinal-lifnr
        keydate            = so_date-low
       balancespgli        = ' '
       noteditems          = ' '
      importing
        return             = return
      tables
        keybalance         = keybalance.
    clear kb .
    loop at keybalance .
       kb = keybalance-lc_bal + kb .
    endloop.
          gs_opdisp-balc = kb.
          gs_opdisp-bukrs =  gs_opfinal-bukrs.
          gs_opdisp-lifnr =  gs_opfinal-lifnr.
          gs_opdisp-name1 =  gs_opfinal-name1.
        at new lifnr .
          sum .
          gs_opfinal-tbal =  gs_opfinal-tdr + gs_opfinal-tcr  .
          gs_opdisp-tbal = gs_opfinal-tbal.
          gs_opdisp-bala = gs_opfinal-tdr .
          gs_opdisp-balb = gs_opfinal-tcr .
          gs_opdisp-gbal = keybalance-lc_bal + gs_opfinal-tbal .
          append gs_opdisp to gt_opdisp.
        endat.
        clear gs_opdisp.
        clear keybalance .
      endloop.
      delete adjacent duplicates from gt_opdisp.
    endform.                    " sub_openbal
    *&      Form  sub_openbal_display
          text
    -->  p1        text
    <--  p2        text
    form sub_openbal_display .
    call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
          i_callback_program              =  repid1
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
          it_fieldcat                     = gt_fcats
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = 'X'
      IS_VARIANT                        =
       it_events                        =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
         tables
           t_outtab                       = gt_opdisp
      exceptions
        program_error                     = 1
        others                            = 2
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " sub_openbal_display

    I think you are using for all entries statement in almost all select statements but i didnt see any condtion before you are using for all entries statement.
    If you are using for all entries in gt_opbal ... make sure that gt_opbal has some records other wise it will try to read all records from the data base tables.
    Try to check before using for all entries in the select statement like
    if gt_opbal is not initial.
    select adfda adfadf afdadf into table
      for all entries in gt_opbal.
    else.
    select abdf afad into table
    from abcd
    where a = 1
        and b = 2.
    endif.
    i didnt see anything wrong in your report but this is major time consuming when you dont have records in the table which you are using for all entries.

  • I have extended video footage taken on my ipad that I need to burn to dvd.  Tried imovie and final cut.  Final Cut rendering time was extremely long. What is easiest way to accomplish my goal?

    I am a video technology teacher and coach at a high school in NJ.  I have footage of a basketball scrimmage that I need to get from my iPad onto a DVD.  I tried importing it into iMovie without success.  I have imported it into Final Cut Pro but the rendering time makes the process very cumbersome with 7/8 hours of rendering time to create a quick time file to then use with iDVD.  Is there a quicker way to accomplish this.

    The Mac does not come with a Blu-ray burner. So you would be burning a Blu-ray compatible file to a standard DVD-5 or DVD-9. Neither of which are ideal for authoring Blu-ray content.
    Do an exhaustive search online about Blu-ray authoring and disk creation. This is not something for the hobbyist video creator (and I say hobbyist in the sense that you're not creating thousands of copies for mass distribution, so no one take offense.)
    Blu-ray is expensive and requires a lot of planning and prep to do it right. But you can't burn an official Blu-ray disc on a Mac as they stand. And, Compressor doesn't burn discs, it only creates files. DVD Studio Pro would be the app that would burn the Blu-ray disc, and DVDSP has not been upgraded since long before Blu-ray came on the scene.

  • HELP: I have an impossibly long rendering time after converting .MP4 files from Go Pro Camera to .MOV on Final Cut Pro 7. PLEASE ADVISE.

    I am working on a project and shot guerilla style footage with a Go Pro camera, which produced .MP4 files incompatible with FCP7. When I converted the files to .MOV, I realized the rendering time in the sequence editor is impossibly long. I am working with a deadline and the rendering time exceeds the deadline, let alone editing time. Suggestions???

    Telling us you converted to .mov doesn't tell us much. MOV is a container that supports a very wide range of codecs. It is the specific CODEC that matters.
    You most likely did not convert the material to a FCP7 native format. ProRes is recommended and, given the compression of the GoPro, ProRes LT would be the best choice.
    Use Compressor to convert everything to ProResLT and life will be much simpler.
    x

Maybe you are looking for