Speed issue when drawing field of Rectangles

I'm working on a fullscreen java app that consists of a 320x320 field of randomly-colored dots, a variable percentage of which should eventually move in concert at up to 100 fps. Right now I'm simply working on drawing a varying field of dots on the screen at that speed. I'm using multiple buffers with the help of the MultiBufferTest example from Sun's Full Screen Exclusive Mode API tutorial. The demo runs great, pages flipping at what appears to be the speed at which I need my graphics to appear on the screen, but the demo draws only one Rectangle.
The problem I'm having seems to be the speed at which my 102400 Rectangles are being drawn on one of the back buffers before being flipped onto the screen. Right now I'm working with 3 buffers, but it doesn't seem to matter how many I use; the speed at which the field appears to plateau at around 1 fps. Some thoughts:
* My random color generation code is outside of the rendering loop.
* I've casted the Graphics object into a Graphics2D object g2, but that hasn't helped.
* The Rectangles are drawn inside nested for loops by row (r) and column (c) using g2.fillRect(c * mSide, r * mSide, mSide, mSide); where mSide is the side length of each Rectangle.
* Is it possible to draw all the frames into a Vector of buffers before the 'animation' begins? Presumably it would still take around 1 second to generate each frame that will appear, so that probably wouldn't work too well.
* I have the O'Reilly book Java 2D Graphics, but it doesn't help much in this situation.
I'm a novice at Java and a novice at graphics programming to boot, so is there anyone out there that can give me some advice on how to speed up the graphics generation?

I'm working on a fullscreen java app that consists of a 320x320 field of randomly-colored dots, a variable percentage of which should eventually move in concert at up to 100 fps. Right now I'm simply working on drawing a varying field of dots on the screen at that speed. I'm using multiple buffers with the help of the MultiBufferTest example from Sun's Full Screen Exclusive Mode API tutorial. The demo runs great, pages flipping at what appears to be the speed at which I need my graphics to appear on the screen, but the demo draws only one Rectangle.
The problem I'm having seems to be the speed at which my 102400 Rectangles are being drawn on one of the back buffers before being flipped onto the screen. Right now I'm working with 3 buffers, but it doesn't seem to matter how many I use; the speed at which the field appears to plateau at around 1 fps. Some thoughts:
* My random color generation code is outside of the rendering loop.
* I've casted the Graphics object into a Graphics2D object g2, but that hasn't helped.
* The Rectangles are drawn inside nested for loops by row (r) and column (c) using g2.fillRect(c * mSide, r * mSide, mSide, mSide); where mSide is the side length of each Rectangle.
* Is it possible to draw all the frames into a Vector of buffers before the 'animation' begins? Presumably it would still take around 1 second to generate each frame that will appear, so that probably wouldn't work too well.
* I have the O'Reilly book Java 2D Graphics, but it doesn't help much in this situation.
I'm a novice at Java and a novice at graphics programming to boot, so is there anyone out there that can give me some advice on how to speed up the graphics generation?

Similar Messages

  • Iteration Speed issue when Indexing 3D array wried to a while-loop

    Brief Description of my Program:
    I am working on the real-time signal generation by using LabView and DAQmx (PCI-6110 card). My vi reads the big data file (typically 8MB txt file containing about 400,000 samples (complex double precision). Then, the signal is pre-processed and I end up with a huge 3D array to feed while-loop (typically 3D array dimension is N x 7 x M where N & M >> 7). Inside the loop, that 3D array is indexed and processed before the results are written to the DAQmx outputs. I have a speed issue when indexing the large 3D array (i.e, 3D array having a large sub-array size). My while-loop could not run fast enough to top-up the DAQmx AO buffer (at the output rate of 96kHz). It could run faster only if I use smaller 3D array (i.e, smaller-sized sub-arrays). I do not quite understand why the size of 3D sub-array affects the rate of looping although I am indexing same sub-array size at each iteration. I really appreciate your comments, advices and helps.
    I include my 3D array format as a picture below.
    Question on LabView:
    How does indexing an 3D array which wires to the while-loop affect the speed of the loop iteration? I found that large dimension of sub-arrays in the 3D array slows down the iteration speed by comparing to indexing the same size of sub-array from smaller-sized sub-arrays of the 3D array to perform signal processing inside the while-loop. Why? Is there any other way of designing LabView Program to improve speed of iteration?
    attachment:

    Thank you all for your prompt replies and your interests. I am sorry about my attachment. But, I have now attached a jpg format image file as you suggested.
    I had read the few papers on large data handling such as "LabVIEW Performance and Memory Management". Thus, I had already tried to avoid making unnecessary copies of data and growing arrays in my while-loop. I am not an expert on LabView, so I am not sure if the issues I have are just LabView fundamental limitations or there are any other ways to improve the iteration speed without reducing the input file size and DAQ output rate.
    As you request, I also attach my top-level vi showing essential sections such as while-loop and its indexing. The attached file is as an image jpg format because the actual vi including Sub-VIs are as big as 3MB in total. I hope my attachment would be useful for anyone who would like to reply my question. If anyone would like to see my whole vi & llb files, I would be interesting to send it to you by an e-mail privately and thus please provide your e-mail address.
    The dimension of my 3D array is N x 7 x M (Page x Row x Column), where N represents number of pages in 3D array, and M represents the size of 1D array.  The file I am currently using forms 3D array of N = 28, & M = 10,731.  Refering to the top-level vi picture I attached, my while-loop indexes each page per iteration and wrap-around.  The sub-VI called "channel" inside the while-loop will further index its input (2D array) into seven of 1D arrays for other signal processsing.  The output from that "channel" sub-VI is the superposition of those seven arrays.  I hope my explaination is clear. 
    Attachement: 3Darray.jpg and MyVi.jpg
    Kind Regards,
    Shein
    Attachments:
    3Darray.jpg ‏30 KB
    MyVI.jpg ‏87 KB

  • Internet speed issues when macbook pro joins Airport Network

    I have an apple tv, two iphones, a PC and a macbook sharing a Airport Extreme internet connection.
    The problem is that all devices are working on full internet speed until i connect my macbook pro late 2009.
    Normaly i have a download speed at 650kb/s but when the macbook connects to the Airport extreme the internet speed is jumping between 20kb/s and 200kb/s
    The unusual thing are the jumps and drops of the speed.
    When i shut down the Macbook all other devices are running on normal internet speed and the internet connection is not jumping anymore.
    What the **** is going on?

    SOLUTION FOUND to MacBook Pro poor Wi-Fi wireless signal.
    First, let's talk about the actual problem: too much signal noise. There is a hidden app in OSX called "Wi-Fi Diagnostics" This will tell you everything you need to know why your Wi-Fi is not working!
    http://support.apple.com/kb/HT5606
    HINT: It is included in 10.7, just look for it.
    The solution!
    Turn off your wi-fi and run your internet through your home's electrical wires. Power-line adapters are devices that turn a home's electrical wiring into network cables for a computer network.
    http://reviews.cnet.com/2733-3243_7-568-8.html
    I purchased TP-LINK TL-PA511 and for the first time I'm downloading with ALL my internet speed (30mb down / 5mb up) tested via www.speedtest.net. I'M SOOOOO HAPPY!!!!
    http://www.amazon.com/TP-LINK-TL-PA511-Powerline-Starter-Kit/dp/B0081FLFQE/ref=s r_1_1?ie=UTF8&qid=1385395374&sr=8-1&keywords=TP-LINK+TL-PA511

  • Does Itunes 8 fix playback speed issue when downloading

    Does the new Itunes 8 fix the slow playback speed issues whenever you are downloading music or a podcast within Itunes?

    For the record, the reported issue seems to have been solved.
    http://lists.apple.com/archives/cocoa-dev/2007/Oct/msg01012.html

  • Row lock issue when doubleclicking field

    hi all,
    i hav this confusing scenario on my oracle forms 6i.
    i have this field that can be enabled trough onmouse double click (with set item propert, update_allowed) that allows user 1 to update current data.
    when user 2 opens the same page where that field is located, and tries to edit that certain field, i encounter an error stating that user 2 could not access the field.
    my database returns a row lock contention.
    is there anyway that 2 users could be able to edit transactions simultaneously?
    thanks in advance

    oradba11 wrote:
    Hi,
    I am wokring on oracle 10.2.0.4 rac 2 node nistances on AIX.
    We have one table having multiple rows defilning jobs will be done by users ...the functionatily is that ..when even one user will pick on row (job) , one update
    statement will issue and it will update status column to 1 which menas job is allocatated , this means now this should not allocate to any other user ..
    but we are facing issue that once any user will pick that job , in applicatoin log files we can see that row gets lock and updates the status to 1 . but then also
    users connecting to other or some time same instance will get that job...means multiple users can pick same job .. even after already picked by other user ..
    Is this can be issue with rac configuration ... like when ever one user updates a row ..it will be in cache of one instance and when other user trys to again update
    2nd instance does not have that information and allows user connected to that instace to pick that job..like delay in block tranfer or cache fusion..
    is this can be issue with rac or it is purely application issue...
    any idea...In principle this is not possible - it's either an application error or a fundamental and catastrophic Oracle bug that people would have made a huge fuss about years ago (and I don't recall hearing such a fuss).
    Regards
    Jonathan Lewis

  • Issue when few fields were added to a custom table

    Hi,
    We have added some new fields to the existing database table(Customize). One of the fields is POD_date (data element- sydatum).
    When we look for entries in table with condition POD_DATE EQ '00/00/0000' or space it gives fewer entries. In place it has to give 18k old entries with 00/00/0000 which it doesnt. Ideally it should have done '00/00/0000'  for all older records as there wasnt field at that time. When fetch without above condition it gives 18k records with field in POD (00/00/0000) but when same thing is given in selectioon criterion it gives fewer.
    Regards
    Mohinder
    Edited by: Mohinder Singh Chauhan on Dec 14, 2009 1:26 PM

    Dear all,
    I encounter quite the same problem :
    We added an include to the table EKKO containing several fields such as ZZTYPC.
    The initialization flag was not set at creation time so the new fields were populated with the NULL value.
    We would like now to initialize the value for all the records of the field ZZTYPC to avoid problems when we use this field as a selection criteria in Tx SE16.
    As suggested in the previous post, I checked the initilization flag for this field at the structure level (Dictionary : Display structure), save & activate but the modification is not carried over the table EKKO : the "initial values" check box stays unchecked for the field ZZTYPC thus the adaptation of EKKO is useless.
    We use DB2 as database.
    You help would be appreciated.
    Best Regards,
    Olivier

  • Speed issue when getting bounds of single monitor in multi-screen display

    I've written the following code which should get the bounds of the first monitor in a n-view (multi-screen) set up so I can size JFrame objects relative to the dimensions of this first monitor. However, this bit of code seems to slow done my constructor by a significant amount of time (ie my program now takes 5 seconds to load as opposed to loading almost instaneously). Is there anything I can do to get this information more quickly? And why does this code take so long to execute?
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] gs =  ge.getScreenDevices();
    GraphicsDevice gd = gs[0];
    GraphicsConfiguration[] gc = gd.getConfigurations();
    Rectangle virtualBounds = new Rectangle(gc[0].getBounds());      Thanks in advance,
    -jake

    I was curious (having never delt with this stuff before about your problem so I put your code into a simple frame and ran it. Sure enough it took on average 2.7s to determine the bounds information and less than a tenth of a secondto setup the GUI. So I added code to print out the timmings of each call in your code and found that almost all of it was in "gd.getConfigurations()". This method says it returns all of the GraphicsConfiguration objects for the device. That could be a lot of objects (on my system it returns 8).
    When I switched to calling getDefaultConfiguration I get the same answer and it comes back in 0 milliseconds making the GUI setup the slowest part:-)
    I am not sure if getDefaultConfiguration is what you want. It is unclear to me that the first element in the configurations array represents the current mode of the device and it is unclear if the detault is the current mode either. I guess you can experiment and see if the default is the configuration you want or not.
    good luck,
    IL
    I attached my code so you can see what I did:/*
    * Created on Jul 12, 2003
    * Created by Leslie Software (<a href="mailto:[email protected]">[email protected]</a>)
    * Copyright 2003 Leslie Software
    package forum.multiplemonitors;
    import javax.swing.*;
    import java.awt.*;
    * @author ileslie Leslie Software (<a href="mailto:[email protected]">[email protected]</a>)
    public class MultipleMonitorsFrame extends JFrame {
         public static void main(String[] args) {
              MultipleMonitorsFrame frame = new MultipleMonitorsFrame ();
              frame.setVisible (true);
         public MultipleMonitorsFrame ()  {
              super ("Monitor Query Timing");
              setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
              long timeBeforeMonitorQuery = System.currentTimeMillis ();
              //  Get the information on the first monitor
              GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
              GraphicsDevice[] gs =  ge.getScreenDevices();
    //          System.out.println ("After getScreenDevices\t " + System.currentTimeMillis ());
              GraphicsDevice gd = gs[0];
              //  Origonally retrieving all configurations and looking at the first
    //          GraphicsConfiguration[] gc = gd.getConfigurations();
    //          System.out.println ("After getConfigurations\t " + System.currentTimeMillis ());
    //          Rectangle virtualBounds = new Rectangle(gc[0].getBounds());
              //  Now just asking for the default          
              GraphicsConfiguration defaultgc = gd.getDefaultConfiguration();
              Rectangle virtualBounds = new Rectangle (defaultgc.getBounds());
              long timeAfterMonitorQuery = System.currentTimeMillis ();
              long monitorQueryTime = timeAfterMonitorQuery - timeBeforeMonitorQuery;
              long timeBeforeGUISetup = System.currentTimeMillis ();
              //  Setup the GUI
              //  Report on timing (including dummy string for gui setup
              JLabel monitorTimeLabel = new JLabel ("Finding out about the monitor took " + monitorQueryTime + " milliseconds");
              JLabel guiSetupTimeLabel = new JLabel ("X");
              //  Report on monitor dimentions          
              JPanel monitorInfoPanel = new JPanel ();
              JLabel monitorInfoTitle = new JLabel ("First monitor size is:");
              JTextField monitorWidth = new JTextField ("" + virtualBounds.width);
              monitorWidth.setEditable(false);
              JLabel monitorInfoBy = new JLabel ("by");
              JTextField monitorHeight = new JTextField ("" + virtualBounds.height);
              monitorHeight.setEditable(false);
              monitorInfoPanel.add (monitorInfoTitle);
              monitorInfoPanel.add (monitorInfoTitle);
              monitorInfoPanel.add (monitorWidth);
              monitorInfoPanel.add (monitorInfoBy);
              monitorInfoPanel.add (monitorHeight);
              getContentPane ().add (monitorTimeLabel, BorderLayout.NORTH);
              getContentPane ().add (monitorInfoPanel, BorderLayout.CENTER);
              getContentPane ().add (guiSetupTimeLabel, BorderLayout.SOUTH);
              pack ();
              long timeAfterGUISetup = System.currentTimeMillis ();
              long guiSetupTime = timeAfterGUISetup - timeBeforeGUISetup;
              //  This is technicly wrong since we should not be accessing a realized GUI component
              //  outside of the event thread but it works and this is just a test app     
              guiSetupTimeLabel.setText ("Setting up the GUI took about " + guiSetupTime + " milliseconds");
    }

  • Speed issue when using Airport Express

    Hello.
    I have had an ongoing battle recently with Internet download speeds.
    I connect my iMac to my Airport Express.
    iMac has Firewall ON.
    When I connect this way, I get slow connection / download speeds.
    The file I am using in this example is the MS Office 2003 SP3 update.
    I get around 200kbps.
    However....
    When I connect my iMac directly via Ethernet to my Cable Modem, I am getting 1.5mbps download.
    Can anyone shed any light on this and advise how I can correctly configure the Airport to get nearer this speed?
    Many thank in advance
    Glenn

    Have you repaired Permissions since the last update/upgrade?
    If not, either do that or get Applejack...
    http://www.versiontracker.com/dyn/moreinfo/macosx/19596
    After installing, reboot holding down CMD+s, then when the prompt shows, type in...
    applejack AUTO
    Then let it do all 5 of it's things.
    At least it'll eliminate some questions if it doesn't fix it.
    The 5 things it does are...
    Correct any Disk problems.
    Repair Permissions.
    Clear out Cache Files.
    Repair/check several plist files.
    Dump the VM files for a fresh start
    While watching Activity Monitor>Networks, are there dips in the download speed, or just flat slow input?
    How many bars do you get?
    What speed does it say it's connecting at in Network Utility?

  • Speed Issue (when AS is used in a Cocoa app)

    Folks;
    First I have posted this on the Cocoa list!
    I am also posting this here because I believe the underlying issue is somewhere between Cocoa and AppleScript and I am not certain where I will find useful advice...
    I have a Cocoa app that has some iPhoto integration.
    Since there is no Cocoa API for iPhoto, like there is for AddressBook, the only way I know to do this is through AppleScript.
    Any other ideas here would be appreciated....
    BTW: This is OS 10.4.10; Xcode 2.4.1; iPhoto 6.0.6; 2 GHz C2D
    The Cocoa app has a compiled AppleScript which I call into for the various handlers with the parameters I need.
    This is working well in every other case.
    For the record it looks like this:
    thisResult = [[[NSApp delegate] asEngine] executeAppleEvent:[ASCode callSub:@"getiPhotoImage" params:
    [NSAppleEventDescriptor descriptorWithString:path],
    nil] error:&errorDict];
    However I have a case where it is taking 25 seconds to execute a single AppleScript statement!
    This same statement has sub-second response when executed in the Script editor.
    If I simulate the Cocoa calls with various handlers in the Script Editor everything is fine - performance is fine!
    I have logging statements embedded in both Cocoa and AppleScript which have allowed me to hone in on the offending statement.
    The result is perfectly repeatable. Every time it takes 25 SECONDS to execute the following:
    [Cut and Paste this into a Script Editor - should work fine...(just change the myPath variable to make it work or fail]
    [You can also save it as a run-only application to see the performance is that incarnation...]
    set myPath to "/Users/SOMEUSERNAME/Pictures/iPhoto Library/Originals/2007/Roll 1/SOMEPICTURENAME.jpg"
    tell application "iPhoto"
    try
    set thisPhoto to first photo whose image path is myPath -- << THIS IS THE CULPRIT
    if thisPhoto exists then
    display dialog "'" & name of thisPhoto & "' was found"
    else
    display dialog "This branch will never occur"
    end if
    on error e number n
    if n = -2753 then
    display dialog "Requested photo was NOT found"
    else
    display dialog "Error: " & n & " - " & e
    end if
    end try
    end tell
    Could anyone shed any light on what is going on here?
    Is there a hidden AppleScript feature like iTunes' 'fixed indexing' which might improve response times?
    Why does it work in Script Editor or as a AS run-only application but then yield such miserable performance under Cocoa?
    Thanks for any and all thoughts!
    Steve

    For the record, the reported issue seems to have been solved.
    http://lists.apple.com/archives/cocoa-dev/2007/Oct/msg01012.html

  • PL/SQL speed issues when using a variable

    I have a very strange issue that is causing problems.
    I am running Golden connecting to a 11g database.
    I created a procedure to insert records into a table based on a query. The source query includes variables that I have populated prior to the insert statement. The problem is that if I use the variable for one very specific where statement, the statement goes from running in less than 1 second, to running in 15 minutes. It gets even more strange though. Not only does a 2nd variable not cause any problems, the exact same variable in the same statement works fine.
    This procedure takes 15 minutes to run.
    declare
        v_start_period date;
        v_end_period date;
    begin
        select add_months(trunc(sysdate,'mm'), -1), trunc(sysdate,'mm')
        into v_start_period, v_end_period
        from dual;
        insert into RESULTS_TABLE
                (first_audit_date, last_audit_date,
                data_column1, data_column2, data_column3)
            select
                a.first_audit_date, a.last_audit_date,
                b.data_column1, b.data_column2, b.data_column3
            from
                SOURCE_TABLE_1 b,
                (select marker_id, min(action_time) as first_audit_date, max(action_time) as last_audit_date
                    from SOURCE_TABLE_2
                    where action_time >= v_start_period and action_time < v_end_period
                    group by marker_id) a
            where b.marker_id = a.marker_id
                and exists (select 1 from SOURCE_TABLE_2
                    where marker_id = b.marker_id
                    and action_time >= v_start_period and action_time < v_end_period
                    and action_type = 'XYZ');
        commit;
    end;This procedure runs in less than 1 second, yet returns the exact same results.
    declare
        v_start_period date;
        v_end_period date;
    begin
        select add_months(trunc(sysdate,'mm'), -1), trunc(sysdate,'mm')
        into v_start_period, v_end_period
        from dual;
        insert into RESULTS_TABLE
                (first_audit_date, last_audit_date,
                data_column1, data_column2, data_column3)
            select
                a.first_audit_date, a.last_audit_date,
                b.data_column1, b.data_column2, b.data_column3
            from
                SOURCE_TABLE_1 b,
                (select marker_id, min(action_time) as first_audit_date, max(action_time) as last_audit_date
                    from SOURCE_TABLE_2
                    where action_time >= v_start_period and action_time < trunc(sysdate,'mm')
                    group by marker_id) a
            where b.marker_id = a.marker_id
                and exists (select 1 from SOURCE_TABLE_2
                    where marker_id = b.marker_id
                    and action_time >= v_start_period and action_time < v_end_period
                    and action_type = 'XYZ');
        commit;
    end;The only difference between the two is where I replace the first v_end_period variable with trunc(sysdate,'mm').
    I've been googling for possible solutions and keep running into something called "parameter sniffing". It appears to be a SQL Server issue though, as I cannot find solutions for Oracle. I tried nesting the insert statement inside it's own procedure with new variables populated by the old variables, but nothing changed.
    Edited by: user_7000017 on Jan 8, 2013 9:45 AM
    Edited by: user_7000017 on Jan 8, 2013 9:52 AM Put the code in code tags.

    You are not describing procedures. You are listing anonymous PL/SQL blocks.
    As for the code - this approach to assigning PL/SQL variables are highly questionable. As the functions are native PL/SQL functions too, there is no need to parse and execute a SQL cursor, do context switching, in order to assign values to PL/SQL variables.
    This is wrong:
    select
        add_months(trunc(sysdate,'mm'), -1), trunc(sysdate,'mm')
        into v_start_period, v_end_period
    from dual;This is correct:
    v_start_period := add_months(trunc(sysdate,'mm'), -1);
    v_end_period := trunc(sysdate,'mm');Just as you would not use +"select 1 into plVariable from dual;+", instead of a standard variable assignment statement like +"plVariable := 1;"+.
    As for the performance/execution difference. Does not make sense. I suggest simplifying the code in order to isolate the problem. For example, take that in-line SQL (aliased as a in the main SQL) and create a testcase where it uses the function, versus a PL/SQL bind variable with the same data type and value as that returned by the function. Examine and compare the execution plans.
    Increase complexity (if no error) and repeat. Until the error is isolated.
    The 1st step in any troubleshooting, is IDENTIFYING the problem. Without knowing what the problem is, how can one fix it?

  • Speed Issues

    Greetings and Salutations,
    I'm having speed issues with my Adobe AIR application. From what I've read on the web, AIR is supposed to be fast at drawing graphics. I am writing an application which has multiple screens. On one of the screens I have a tab (SuperNavigator) which has a canvas on it. That canvas has a series of other canvases (built with a repeater) that have graphics in them. I am having speed issues when I have more than 50 of these children canvases. I've tried running it without the graphics (code below is without the graphics) to see how it performs. When I have 954 of these canvases being drawn it takes about 2.5 minutes to draw. This is unacceptable and I'm wondering if this is something I've induced or if AIR was never meant to handle such a large amount of canvases (actually this isn't a large amount, in a real world environment there could be a lot more). I've included relevant clips from the code. There are a couple empty boxes that in the real application will hold graphics.
    The class withing the Tab Navigator is a canvas.
    In the action Script (the setter line takes 2.5 minutes to get past) (it's binding to the repeater that seems to be my problem).
    [Bindable]  private
    private  var _assetList:Array;
    [Bindable]  
    public function get timelineAssetList():Array{ 
         return this._assetList;
    public function set timelineAssetList(ac:Array):void{ 
         this._assetList = ac;
    The MXML code that is being bound to:
     <mx:Canvas id="labelCanvas" left="0" right="0" top="0" height="65" verticalScrollPolicy="off" scroll="scrolling(event)">
          <mx:HBox horizontalGap="1" left="10" right="10" top="10">  
              <mx:Spacer width="2"/>  
                <mx:Canvas width="{getHeaderWidth()}" height="40" borderStyle="solid" borderColor="{StaticVariables.borderColor.getColorUint()}" horizontalCenter="0">
                <PastDataView:ColorBarScale id="scale" bottom="10"/>   
         </mx:Canvas>  
              <mx:Canvas width="20" height="40">  
                   <mx:Spacer width="20" />  
              </mx:Canvas>  
         </mx:HBox>  
    </mx:Canvas>
    <mx:Canvas id="assetCanvas" left="0" right="0" bottom="0" top="65" scroll="scrolling(event)">
         <mx:VBox y="10" right="16" left="10" verticalGap="0">  
              <mx:Repeater id="assetRepeater" dataProvider="{timelineAssetList}">  
                   <mx:HRule width="100%"/>
                   <PastDataView:ColorBarBar  id="barArray" width="100%" height="170" asset="{assetRepeater.currentItem}"/>  
              </mx:Repeater>
         </mx:VBox>  
    </mx:Canvas>
    The ColorBarBar consists of:
    <?xml version="1.0" encoding="utf-8"?><mx:Canvas  xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300" xmlns:PastDataView="org.XXXXXX.CenterScreen.PastDataView.*" horizontalScrollPolicy="off" click="clicked()">
         [Bindable] 
         public static var _colorBarHeight:int = StaticVariables.colorBarHeight;
         [Bindable] 
         private var _asset:Object;
         [Bindable] 
         public function set asset(a:Object):void{ 
              this._asset = a;          getBackgroundColor();
         public function get asset():Object{ 
              return _asset;     }    
          private function getBackgroundColor():void { 
              var color:String = asset.color; 
              if (color == null) color = "Black"; 
              if( color.toLowerCase() == "blue" ) {
                   lblAssetTag.setStyle("color", 0x1674cc);               lblAsset.setStyle(
    "color", 0x1674cc);          }
    else if( color.toLowerCase() == "red" ) {
                   lblAssetTag.setStyle("color", 0xe35353);               lblAsset.setStyle(
    "color", 0xe35353);          }
    else if(color.toLowerCase() == "grey" || color.toLowerCase() == "gray") {               lblAssetTag.setStyle(
    "color", 0xe55555);               lblAsset.setStyle(
    "color", 0xe55555);          }
    else { // give it a default color                lblAssetTag.setStyle(
    "color", 0x000000);               lblAsset.setStyle(
    "color", 0x000000);          }
          private function calculateActivityRepeaterHeight():int{ 
              return this.height-50-_colorBarHeight;     }
          public function clicked():void{
              dispatchEvent(new SelectAssetEvent(this._asset, false, false, true));     }
         ]]>     </mx:Script>
           <mx:VBox left="0" top="0" right="0">
               <mx:Spacer height="1"/>
               <mx:HBox>
                    <mx:Spacer width="2"/>               <mx:Label id="lblAssetTag" text="{asset.type}: " fontWeight="bold" fontSize="12" doubleClickEnabled="true" doubleClick="titleClicked()"/>  id="lblAssetTag" text="{asset.type}: " fontWeight="bold" fontSize="12" doubleClickEnabled="true" doubleClick="titleClicked()"/> id="lblAssetTag" text="{asset.type}: " fontWeight="bold" fontSize="12" doubleClickEnabled="true" doubleClick="titleClicked()"/> 
                   <mx:Label id="lblAsset" text="{asset.name}" fontSize="12" doubleClickEnabled="true" doubleClick="titleClicked()"/>
                    <mx:Label id="lblAssetId" text="{'(' + asset.id + ')'}" fontSize="12" visible="{mx.core.Application.application.debugMode}"/>
               </mx:HBox>
              <mx:HBox horizontalGap="1">
                    <mx:Spacer width="2"/>
                    <mx:Spacer width="10" />
                    <mx:VBox  width="100%">                    <mx:VBox>
                        </mx:VBox>   
                        <mx:VBox  id="displays" verticalScrollPolicy="auto" height="{calculateActivityRepeaterHeight()}" horizontalScrollPolicy="off">
                        </mx:VBox>   
                   </mx:VBox>   
              </mx:HBox>
              <mx:Spacer height="2"/>
          </mx:VBox></mx:Canvas>
    I would appreciate any thoughts or feedback you could provide.
    ~martin

    The Canvas is a very heavy object that has lots of overhead.  Even worse is the VBox object that is in there multiple times. 
    What exactally are you trying to accomplish?  Just looking over the code, it seems that the same could be done directly with the Graphics API, at a much faster rate.
    For each of the VBoxes and Canvases you have, the entire size of each child and parent need to be re-evalulated each time you add or change something.  This is a HUGE overhead, and probably why the app is running so slow.  You may need to convert this app to use simpler objects (UIComponent or something lower-level like that) to get any speed.
    Are you using Flex Bulder?  Take a look at the app while the Profiler is running to see what I'm talking about.

  • Mapping Issue:Assign src field val to target when src field not exists

    Hi
    Pls guide though the following issue in Message Mapping
    I do have a segment of 0...n. where the target element is manipulated based on the three fields in source segment.
    <Source>
    Parent Segment (1..1)
         Segment     (0...n)
              Field_1  =  23k     
              Field_2  =      01
              Field_3  =  (either 'X' or No field in IDOC segment)
    <Target>
    Segment (1...1)
         t_Field  =  ( if ( ( Field_1 = '23K') & (Field_2 = '01'))  then  assign Field_3  )
    How can i check or handle this Field_3 issue when its not present in IDOC segment?
    Note: I am using UDF, and getting errors while retrieving Field_3 data when the field itself is not present in segment inside loop statement.
    Thanks,
    Vinod V

    Thanks Mickael for the reply,
    I have tried the same, and its working fine with the Display Queue. But giving following error while performing the Transformation Test.
    I found that in loop Field_3 returns value at first index only. It does not increment.
    Field_3's context is set to Parent Context.
    Please help with inputs.
    regards,
    Vinod V

  • Properties bar always opens when drawing a rectangle?

    Everytime I use the rectangle tool, the properties bar opens on the right hand side (like this: http://prntscr.com/37tcpg) and it gets really annoying when I'm trying to draw loads of rectangles because I don't really use it and it can get in the way of the image. Is there a way to stop it opening everytime? It didn't do it in CS6 but in CC it does.

    After you draw out your rectangle shape, go the flyout menu on the Properties panel and uncheck Show on Shape Creation.

  • HT1657 Last night I rented a movie successully (Argo) but it would not download. Support was called and I was advised that it was probably an internet speed issue. This was confirmed when I did a speed test as suggested. They now want to sell me some soft

    Last night I rented a movie successully (Argo) but it would not download. Support was called and I was advised that it was probably an internet speed issue. This was confirmed when I did a speed test as suggested. They now want to sell me some software for $40.00. Help

    Hi,
    No, it was Apple. Last night the movie (Argo) was downloaded. It took   about an hour, however it did  not open.
    I can watch the preview, but can't open it.
    Thanks for your interest.
    George

  • Problem with BlendMode.Erase when drawing on bitmap

    Hi
    I have a scenario where I have to draw a UIComponent on a bitmap. UIComponent contains multiple sprites. One of the sprite has a blend mode of ERASE. The uicomponent draws perfectly on the screen, but the erase sprite started appearing when I draw on a bitmap.
    I am attaching a sample which shows this problem. There are two sprites in a UICompnent, the yellow sprite is drawn with normal blend mode, while the cyan sprite is drawn with erase blend mode. The first drawing where only yellow rectangle is shown is drawn on screen, while the second is image component whose source is bitmap generated from the drawing of first compnonet.
    The thing starts working fine when i draw the cyan rectangle twice one without erase mode and than with erase blend mode. But this solution is quite heavy in my envrionment, as there are multiple erase rectangles.
    Any other suggestion or solution ?
    The source code is also attached.

    hi ..
    i have'nt seen your post before but i have the same issue with my project right now..please check out the link given below.
    http://forums.adobe.com/thread/742713?tstart=0
    please help, if you have any solution to this problem.

Maybe you are looking for

  • Iphone 4s keeps deleting contacts and calendar events

    I've had my phone for about 4 months now, and twice within this short time my phone has randomly been fine and then I'll text someone and the next thing I know all my contacts are gone as well as everything put into my calendar. What can I do? I have

  • How to format a text field for credit card numbers?

    OK, I found this conversation, http://forums.adobe.com/message/3598185, that gave some useful insight, and I adapted the code presented in it to make sure the user types in a 16-digit number, and it tells them to do it right if they don't. Here's my

  • Create a multiple Pg PDF with Forms, while adding up total of each page.

    My name is Javier Morales, I am working on a project for a client in the clothing business. I created a form that it is working very good. I would like your help on figuring out how to insert additional pages to a Pdf form document and keep on adding

  • PC not detecting WRT54GS v7

    Having a bit of trouble here. Just bought a WRT54GS v7 from Wal-Mart and it won't get past the 'Detecting Router' step in the EasyLink setup. I know for a fact that I've got all my wires connected properly, and in the right order, but my PC just isn'

  • I lost my iphone yesterday, how can i find it?

    Hi, I lost my iPhone yesterday and I don't think I had the "findmyphone" app, can you help?