Slow Execution

Dear All,
I have a Z Module pool program, where everything is processing at a good speed, but the execution comes to halt at a line, where i'm calling a new screen.
" CALL SCREEN '0200'. "
Previously it was working fine, but after a change request, execution almost comes to an halt on this specific line.
Please suggest.
Regards,
Varun

Hi Varun Chopra,
Once you call a screen using CALL SCREEN statement, the PBO of called screen is executed before that screen layout is presentted to the user. In your case there should be some infinite loop in one of the PBO modules of screen 200. Please activate a session break point in the first PBO module of your screen 200 and debug to see which block of code causes problem.
Since you have not given further details of your problem, I assume there is no run-time error when calling screen 200.
Regards
Suresh

Similar Messages

  • MODBUS/TCP very slow execution

    Dear all
    We are new user to Labview and to LabVIEW forum.
    We are designing a LabVIEW application that interacts with PLCs.
    We are trying to exchange information between a PC/labview and a PLC. Both support the MODBUS/TCP protocole. We have designed the 2 programs easily, the PC/LabVIEW one being easily made with VI Library.
    We first the PC/LabVIEW as a cleint and the PLC as server and it works perfect. It is quite fast as it takes less than 1 second.
    We test the reverse configuration ie PLC as client and PC/LabVIEW as server. Of course we use different programs there and monitor the MODBUS/TCP frames with WireShark.
    It works also but the execution on the PC/LabVIEW is very long (in the debug mode) : it takes 5 secondes to execute the Write Multiple Register function ( 2 data to write) to prepare the response frame and to send it back. It is very nice to see the animation on the diagram but why is it so long ? This long time frame is a very big problem for our application.
    We re not sure to know where to dig in !
    Thank you in advance for your help.
    Regards
    Thierry

    It sounds like you need to learn more about the LabVIEW development environment if you were confused about the slow speed of highlight execution.
    I would recommend looking at the online LabVIEW tutorials
    LabVIEW Introduction Course - Three Hours
    LabVIEW Introduction Course - Six Hours

  • MYSQL slow execution of CF 7x

    I have an issue that is rather irritating. I'm playing
    around with MYSQL 5.0 on my laptop with Coldfusion 7x
    developer edition. I'm using the J-connector 5.0.3.
    It's a duo core 1.8 processor with 1 gig of ram. Any
    time I include a query of any size accessing tables
    with less than 20 records it can take up to 3 seconds
    on the debug info. The tables are all properly indexed
    and keyed. I've hit several sites and forums to
    determine if anyone else is having the issue I am.
    They all say things are running fine.
    Most queries say 0 msec which is right but after CF
    processes the cfincluded query it adds about 3 seconds
    on the execution. I'm thinking maybe the database and
    the cf server might be fighting over the bus to the
    CPU. I just don't know. Have you experienced anything
    like this?

    David, I'm experiencing the same problem. And it's not a
    problem with the table joins. I am running a CF/JSP environment and
    I run the exact same queries using the exact same driver, and only
    experience the problems with CF, the queries run fast in JSP. Mind
    you, this is only occurring with MySQL 5 as previous versions of
    MySQL ran fine with CF.
    Has anyone experienced massive slow down when using MySQL 5
    and CF7?
    Here are the environments I've tested. I've gotten the same
    slow response with each one (up to 5 seconds to return an empty
    query)
    CF7/Tomcat with MySQL 5 with Connecter/J 5.0
    CF7/Tomcat with MySQL 5 with Connecter/J 3.1.10
    CF7/IIS with MySQL 5 with Connecter/J 5.0
    CF7/IIS with MySQL 5 with Connecter/J 3.1.10
    CF7/IIS with MySQL 5 with ODBC/3.5.1
    CF7/IIS with MySQL 5 with ODBC/5.0
    In each case I've gotten the same results. I've installed on
    multiple machines, all running Windows and CF 7, MySQL 5 and Tomcat
    5.5 running on the same local server.
    Any help would be much appreciated.

  • Slow Execution Time of Exponentia​l Function

    Hi,
    I am developing a program with large dataset (arrays size of around 1000*1000 elements).
    I realised that my program ran quite slow when calculating exponential for each array elements.
    So, I built a simple porgram to test the execution time for exponential vs multiplication on 1000*1000 array elements and found
    out that the period is ~25 times longer. Attached is the program (Labview 2011).
    The specs of my system are:
    1) Windows 7
    2) Intel i5 3Ghz with 4gb ram
    3) Labview 2011
    The actual program I built has a version in Matlab and uses exponential function as well. However, the execution time in Labview is around 10 times longer than the Matlab. I believe that the exponential function is the cause of this after making some analysis using built-in "Performance and Memory" tool and modification to the program.
    Is there any way I could make the exponential function runs faster? Or any better way to handle large array operation? (I have tested array operations with nested FOR loops and paralel execution but the results is not that great.
    Hope anyone can help. Thanks for any input.
    Attachments:
    Execution Time-Exponential Function.vi ‏11 KB

    Thank you for your answer. 
    I am sorry, I could not upload the real code since it is large and has lots of dependency. But, I wrote simple program both in Labview and Matlab as attached.
    I tried to make both program doing the same thing and put each element as random number between 0-1 to avoid any folding/optimization process.
    The Labview took around 974ms to complete the task while the matlab 177ms. If the the way I implemented them are correct, the Matlab is around 5 to 6 times faster than Labview to execute Exponential function.
    Attachments:
    Matlab Exponential Test.PNG ‏19 KB
    Labview Exponential Test.PNG ‏24 KB
    Exponential Test.vi ‏10 KB

  • Slow execution of a event structure(​Calling VI)

    The VI i created is gettin slow after execution of a particular set of event in an event structure(Calling VI).Is it because of improper use of shift register?
    I have attatched the VIs...Please run GUIdev and suggest solutions.Its really gettin on my nerves.
    Attachments:
    GUIFDR.zip ‏88 KB

    Hi altenbach
    Thanks for finding ways to optimize the code...but i have a few doubts.
    CPU burner:I took care of the cpu burner condition.I jst called those for trying out t main VI.I will be replacing those VI with developed ones.
        * Why are you bundling and then immediately unbundling all these pictures?
         Ans:chgd it
        * You have many overlapping objects on the front panel. Not good for performance.
         Ans:I am making a GUI so i thk i have no other choice but to overlap them.Also is there ny way to remove the frame from the picture box.I have just minimized and kept it.
        * Use an array of paths and index the desired element instead of reading via value property nodes.
         Ans: Can u site an eg for it..i dnt hav tht level of experience
        * There is no event for the stop button.
           Ans:Is it necessary?I will be modifying it in the future.
        * You don't need the timeout event.
           Ans: Modified it
        * Lots of near duplicate event cases. Once instance of each is enough, simply use control references.
           Ans:Each event case is either for moving out,moving in or clicking of the sliding button.How do i use a control referece for it?
        * Lots of duplicate code for the pictures and paths. Use an array of names, autoindex it on a FOR loop, and use only one copy of the code fragment.
          Anslease site an example so i can follow suite.
        * You seem to insert a VI at every iteration of the loop. Is this really necessary?
         Ans:Actually i wanted to insert a Vi only on the mouse down event, and continue running the same VI even if other mouse events take place.But i cant thk of a logic to avoid thm.But i really need a solution for tht.
    Can you explain in a bit more detail what you are actually trying to achieve with all this? Thanks! :
    My Vi as u can see is a GUI for downloading data from a hard disk and viewing and modifying the video and audio data.I will be interfacing the video and audio part later on as it is still being developed by my frnds.
    Also the problem of inserting a VI at every iteration is goig to pose a problem in the future as i want  to load each VI only for mouse clicks and let it run for all other instances.
    Please help me out
    regards
    Sankar

  • SQL query with Bind variable with slower execution plan

    I have a 'normal' sql select-insert statement (not using bind variable) and it yields the following execution plan:-
    Execution Plan
    0 INSERT STATEMENT Optimizer=CHOOSE (Cost=7 Card=1 Bytes=148)
    1 0 HASH JOIN (Cost=7 Card=1 Bytes=148)
    2 1 TABLE ACCESS (BY INDEX ROWID) OF 'TABLEA' (Cost=4 Card=1 Bytes=100)
    3 2 INDEX (RANGE SCAN) OF 'TABLEA_IDX_2' (NON-UNIQUE) (Cost=3 Card=1)
    4 1 INDEX (FAST FULL SCAN) OF 'TABLEB_IDX_003' (NON-UNIQUE)
    (Cost=2 Card=135 Bytes=6480)
    Statistics
    0 recursive calls
    18 db block gets
    15558 consistent gets
    47 physical reads
    9896 redo size
    423 bytes sent via SQL*Net to client
    1095 bytes received via SQL*Net from client
    3 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    55 rows processed
    I have the same query but instead running using bind variable (I test it with both oracle form and SQL*plus), it takes considerably longer with a different execution plan:-
    Execution Plan
    0 INSERT STATEMENT Optimizer=CHOOSE (Cost=407 Card=1 Bytes=148)
    1 0 TABLE ACCESS (BY INDEX ROWID) OF 'TABLEA' (Cost=3 Card=1 Bytes=100)
    2 1 NESTED LOOPS (Cost=407 Card=1 Bytes=148)
    3 2 INDEX (FAST FULL SCAN) OF TABLEB_IDX_003' (NON-UNIQUE) (Cost=2 Card=135 Bytes=6480)
    4 2 INDEX (RANGE SCAN) OF 'TABLEA_IDX_2' (NON-UNIQUE) (Cost=2 Card=1)
    Statistics
    0 recursive calls
    12 db block gets
    3003199 consistent gets
    54 physical reads
    9448 redo size
    423 bytes sent via SQL*Net to client
    1258 bytes received via SQL*Net from client
    3 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    55 rows processed
    TABLEA has around 3million record while TABLEB has 300 records. Is there anyway I can improve the speed of the sql query with bind variable? I have DBA Access to the database
    Regards
    Ivan

    Many thanks for your reply.
    I have run the statistic already for the both tableA and tableB as well all the indexes associated with both table (using dbms_stats, I am on 9i db ) but not the indexed columns.
    for table I use:-
    begin
    dbms_stats.gather_table_stats(ownname=> 'IVAN', tabname=> 'TABLEA', partname=> NULL);
    end;
    for index I use:-
    begin
    dbms_stats.gather_index_stats(ownname=> 'IVAN', indname=> 'TABLEB_IDX_003', partname=> NULL);
    end;
    Is it possible to show me a sample of how to collect statisc for INDEX columns stats?
    regards
    Ivan

  • Problem with slow execution on a cFP-2120

    I have an application that runs on a cFP-2120, using web interface for the user to interact with the program.
    I have noticed that in order to get the web interface to get updated I have to use property nodes and write to the value property, see this article:
    http://digital.ni.com/public.nsf/allkb/FC5024A5DD6344C886256C8C0054689B?OpenDocument
    However, this seems to give me a serious performance hit, as described here:
    http://forums.ni.com/ni/board/message?board.id=170&thread.id=153531&view=by_date_ascending&page=1
    I have tested with this code, and with my LV 8.2 a loop that uses 277ms to complete when writing directly to a indicator will use 203159ms when using a property node.
    So, I need to update several front panel objects using the value property, but can't afford the cpu time. Does anyone have a suggestion how to do this as efficiently as possible? The problem is apparantly that using the value property requires the front panel to be loaded - can I for instance avoid doing this once for each variable?

    I've changed the vi now so it only writes to value property when a value has changed. This has cut execution time in half, from 500ms to 250ms. I still think this is quite a lot...
    To give you an indication of "size", the executeable is 1210kb with 2 dll's of 872 and 168kb.
    I've not tried deploying a smaller (cut down?) version - what exactly do you mean?
    With regards to writing to value instead of locals or directly - I've had problems with the values not updating - but not always - and the first link does suggest a bugfix. I'd like to know why wiring to value property is sometimes needed and sometimes not.

  • Slow execution, flickering graphics, and too many threads, oh my!

    i wrote a little game called Aim, Fire! just to screw around.
    its immense complexity involves shooting little targets that fly across the screen.
    you can see it at http://www.brianmaissy.com/applets/aimfire
    i made a class representing a target that paints itself and is its own thread.
    its kinda nifty in a OOP sort of way: all i have to do is instantiate a target; and it takes care of the rest, notifying the driver program of anything important (like it getting shot)
    the problem, however, is the speed changes significantly depending on how many targets are active, and the graphics are very flickery.
    i think the problem may be that having multiple threads is slow.
    i also tried buffering my graphics but it didnt work very well.
    however that may just be because i did it wrong.
    in fact i probably did a lot of things wrong - please notify me of anything you see that i did badly
    so tell me what you think about the design of the program, and any suggestions you have to restructure it. would i do better just to stick everything in one thread, or even all in one class?
    thanks very much!
    here is the code: (also found at http://www.brianmaissy.com/applets/aimfire/aimFire/AimFire.java and http://www.brianmaissy.com/applets/aimfire/aimFire/Target.java)
    package aimFire;
    import java.applet.Applet;
    import java.awt.Color;
    import java.awt.Event;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.Point;
    import java.util.ArrayList;
    import java.util.Random;
    public class AimFire extends Applet{
         public static final int SPEED_CONSTANT = 500;
         public static final int MIN_X = 0;
         public static final int MIN_Y = 21;
         public static final int MAX_X = 399;
         public static final int MAX_Y = 399;
         Image ammoImage;
         private Random rand;
         private static final int CLIP = 10;
         private static final int TOTAL_TARGETS = 20;
         private int toBeAdded;
         private ArrayList<Target> targets;
         private int targetsKilled;
         private int ammo;
         private int score;
         private boolean gameActive;
         public void init(){
              setSize(400, 400);
              setBackground(Color.black);
            setCursor(getToolkit().createCustomCursor(getImage(this.getClass().getResource("crosshair.gif")), new Point(16, 16), "crosshair"));
            ammoImage = getImage(this.getClass().getResource("ammo.gif"));
            rand = new Random();
            ammo = CLIP;
            score = 0;
            gameActive = true;
            targetsKilled = 0;
            toBeAdded = TOTAL_TARGETS;
            targets = new ArrayList<Target>();
            sendRandom();
            sendRandom();
         public boolean mouseDown(Event e, int x, int y){
              if(gameActive && ammo > 0){
                   ammo--;
                   for(int count = 0; count < targets.size(); count++){
                        score += targets.get(count).hit(x, y);
                   repaint();
              return true;
         public boolean keyDown(Event e, int key){
              if((char)key == ' ' && gameActive){
                   ammo = CLIP;
                   repaint();
              return true;
         private void sendRandom(){
            toBeAdded--;
              Target t = new Target(this, getGraphics(), rand);
              targets.add(t);
            new Thread(t).start();
            repaint();
         public void notifyOfDeath(Target t){
              targetsKilled++;
              targets.remove(t);
              if(toBeAdded > 0){
                   sendRandom();
              if(targets.size()==0){
                   gameActive = false;
              repaint();
         public void paint(Graphics g){
              g.setColor(Color.gray);
            g.drawLine(0, 20, 399, 20);
              for(int count = 0; count < ammo; count++){
                   g.drawImage(ammoImage, count*10 + 3, 3, this);
              if(ammo == 0){
                   g.drawString("press space to reload", 3, 13);
            g.drawString("Targets: " + targetsKilled + "/" + TOTAL_TARGETS, 230, 13);
            g.drawString("Score: " + score, 340, 13);
              if(!gameActive){
                   g.setColor(Color.gray);
                   g.drawString("Game Over", 170, 200);
                   g.drawString("Score: " + score, 170, 230);
    package aimFire;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.util.Random;
    public class Target implements Runnable{
         private AimFire a;
         private Graphics g;
         private int radius;
         private int xLocation;
         private int yLocation;
         private int xDirection;
         private int yDirection;
         private int xSpeed;
         private int ySpeed;
         public Target(AimFire driver, Graphics graphics, Random rand){
              this(driver, graphics, 3*(rand.nextInt(9)+ 2), rand.nextInt(1 + AimFire.MAX_X - 60) + 30 + AimFire.MIN_X, rand.nextInt(1 + AimFire.MAX_Y - 60 - AimFire.MIN_Y) + 30 + AimFire.MIN_Y, rand.nextInt(3)-1, rand.nextInt(3)-1, rand.nextInt(5)+1, rand.nextInt(5)+1);
              if(xDirection == 0 && yDirection == 0){
                   if(rand.nextInt(2)==0){
                        if(rand.nextInt(2)==0){
                             xDirection = 1;
                        }else{
                             xDirection = -1;
                   }else{
                        if(rand.nextInt(2)==0){
                             yDirection = 1;
                        }else{
                             yDirection = -1;
         public Target(AimFire driver, Graphics graphics, int r, int x, int y, int xDir, int yDir, int xSp, int ySp){
              a = driver;
              g = graphics;
              radius = r;
              xLocation = x;
              yLocation = y;
              xDirection = xDir;
              yDirection = yDir;
              xSpeed = xSp;
              ySpeed = ySp;
         public void run() {
              if(g!=null){
                   paint();
                   int count = 1;
                   while(xLocation >= AimFire.MIN_X && xLocation <= AimFire.MAX_X && yLocation >= AimFire.MIN_Y && yLocation <= AimFire.MAX_Y){
                        unpaint();
                        if(count % (AimFire.SPEED_CONSTANT/xSpeed) == 0){
                             xLocation += xDirection;
                        if(count % (AimFire.SPEED_CONSTANT/ySpeed) == 0){
                             yLocation += yDirection;
                        paint();
                        count++;
                   unpaint();
                   a.notifyOfDeath(this);
         public int hit(int x, int y){
              if(Math.abs(x - xLocation) < radius/3 && Math.abs(y - yLocation) < radius/3){
                   xLocation = -99;
                   return 3;
              }else if(Math.abs(x - xLocation) < 2*radius/3 && Math.abs(y - yLocation) < 2*radius/3){
                   xLocation = -99;
                   return 2;
              }else if(Math.abs(x - xLocation) < radius && Math.abs(y - yLocation) < radius){
                   xLocation = -99;
                   return 1;
              }else{
                   return 0;
         private void paint(){
              g.setColor(Color.red);
              g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
              g.setColor(Color.white);
              g.fillOval(xLocation-2*radius/3, yLocation-2*radius/3, 4*radius/3, 4*radius/3);
              g.setColor(Color.red);
              g.fillOval(xLocation-radius/3, yLocation-radius/3, 2*radius/3, 2*radius/3);
         private void unpaint(){
              g.setColor(Color.black);
              g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
    }

    i wrote a little game called Aim, Fire! just to screw around.
    its immense complexity involves shooting little targets that fly across the screen.
    you can see it at http://www.brianmaissy.com/applets/aimfire
    i made a class representing a target that paints itself and is its own thread.
    its kinda nifty in a OOP sort of way: all i have to do is instantiate a target; and it takes care of the rest, notifying the driver program of anything important (like it getting shot)
    the problem, however, is the speed changes significantly depending on how many targets are active, and the graphics are very flickery.
    i think the problem may be that having multiple threads is slow.
    i also tried buffering my graphics but it didnt work very well.
    however that may just be because i did it wrong.
    in fact i probably did a lot of things wrong - please notify me of anything you see that i did badly
    so tell me what you think about the design of the program, and any suggestions you have to restructure it. would i do better just to stick everything in one thread, or even all in one class?
    thanks very much!
    here is the code: (also found at http://www.brianmaissy.com/applets/aimfire/aimFire/AimFire.java and http://www.brianmaissy.com/applets/aimfire/aimFire/Target.java)
    package aimFire;
    import java.applet.Applet;
    import java.awt.Color;
    import java.awt.Event;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.Point;
    import java.util.ArrayList;
    import java.util.Random;
    public class AimFire extends Applet{
         public static final int SPEED_CONSTANT = 500;
         public static final int MIN_X = 0;
         public static final int MIN_Y = 21;
         public static final int MAX_X = 399;
         public static final int MAX_Y = 399;
         Image ammoImage;
         private Random rand;
         private static final int CLIP = 10;
         private static final int TOTAL_TARGETS = 20;
         private int toBeAdded;
         private ArrayList<Target> targets;
         private int targetsKilled;
         private int ammo;
         private int score;
         private boolean gameActive;
         public void init(){
              setSize(400, 400);
              setBackground(Color.black);
            setCursor(getToolkit().createCustomCursor(getImage(this.getClass().getResource("crosshair.gif")), new Point(16, 16), "crosshair"));
            ammoImage = getImage(this.getClass().getResource("ammo.gif"));
            rand = new Random();
            ammo = CLIP;
            score = 0;
            gameActive = true;
            targetsKilled = 0;
            toBeAdded = TOTAL_TARGETS;
            targets = new ArrayList<Target>();
            sendRandom();
            sendRandom();
         public boolean mouseDown(Event e, int x, int y){
              if(gameActive && ammo > 0){
                   ammo--;
                   for(int count = 0; count < targets.size(); count++){
                        score += targets.get(count).hit(x, y);
                   repaint();
              return true;
         public boolean keyDown(Event e, int key){
              if((char)key == ' ' && gameActive){
                   ammo = CLIP;
                   repaint();
              return true;
         private void sendRandom(){
            toBeAdded--;
              Target t = new Target(this, getGraphics(), rand);
              targets.add(t);
            new Thread(t).start();
            repaint();
         public void notifyOfDeath(Target t){
              targetsKilled++;
              targets.remove(t);
              if(toBeAdded > 0){
                   sendRandom();
              if(targets.size()==0){
                   gameActive = false;
              repaint();
         public void paint(Graphics g){
              g.setColor(Color.gray);
            g.drawLine(0, 20, 399, 20);
              for(int count = 0; count < ammo; count++){
                   g.drawImage(ammoImage, count*10 + 3, 3, this);
              if(ammo == 0){
                   g.drawString("press space to reload", 3, 13);
            g.drawString("Targets: " + targetsKilled + "/" + TOTAL_TARGETS, 230, 13);
            g.drawString("Score: " + score, 340, 13);
              if(!gameActive){
                   g.setColor(Color.gray);
                   g.drawString("Game Over", 170, 200);
                   g.drawString("Score: " + score, 170, 230);
    package aimFire;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.util.Random;
    public class Target implements Runnable{
         private AimFire a;
         private Graphics g;
         private int radius;
         private int xLocation;
         private int yLocation;
         private int xDirection;
         private int yDirection;
         private int xSpeed;
         private int ySpeed;
         public Target(AimFire driver, Graphics graphics, Random rand){
              this(driver, graphics, 3*(rand.nextInt(9)+ 2), rand.nextInt(1 + AimFire.MAX_X - 60) + 30 + AimFire.MIN_X, rand.nextInt(1 + AimFire.MAX_Y - 60 - AimFire.MIN_Y) + 30 + AimFire.MIN_Y, rand.nextInt(3)-1, rand.nextInt(3)-1, rand.nextInt(5)+1, rand.nextInt(5)+1);
              if(xDirection == 0 && yDirection == 0){
                   if(rand.nextInt(2)==0){
                        if(rand.nextInt(2)==0){
                             xDirection = 1;
                        }else{
                             xDirection = -1;
                   }else{
                        if(rand.nextInt(2)==0){
                             yDirection = 1;
                        }else{
                             yDirection = -1;
         public Target(AimFire driver, Graphics graphics, int r, int x, int y, int xDir, int yDir, int xSp, int ySp){
              a = driver;
              g = graphics;
              radius = r;
              xLocation = x;
              yLocation = y;
              xDirection = xDir;
              yDirection = yDir;
              xSpeed = xSp;
              ySpeed = ySp;
         public void run() {
              if(g!=null){
                   paint();
                   int count = 1;
                   while(xLocation >= AimFire.MIN_X && xLocation <= AimFire.MAX_X && yLocation >= AimFire.MIN_Y && yLocation <= AimFire.MAX_Y){
                        unpaint();
                        if(count % (AimFire.SPEED_CONSTANT/xSpeed) == 0){
                             xLocation += xDirection;
                        if(count % (AimFire.SPEED_CONSTANT/ySpeed) == 0){
                             yLocation += yDirection;
                        paint();
                        count++;
                   unpaint();
                   a.notifyOfDeath(this);
         public int hit(int x, int y){
              if(Math.abs(x - xLocation) < radius/3 && Math.abs(y - yLocation) < radius/3){
                   xLocation = -99;
                   return 3;
              }else if(Math.abs(x - xLocation) < 2*radius/3 && Math.abs(y - yLocation) < 2*radius/3){
                   xLocation = -99;
                   return 2;
              }else if(Math.abs(x - xLocation) < radius && Math.abs(y - yLocation) < radius){
                   xLocation = -99;
                   return 1;
              }else{
                   return 0;
         private void paint(){
              g.setColor(Color.red);
              g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
              g.setColor(Color.white);
              g.fillOval(xLocation-2*radius/3, yLocation-2*radius/3, 4*radius/3, 4*radius/3);
              g.setColor(Color.red);
              g.fillOval(xLocation-radius/3, yLocation-radius/3, 2*radius/3, 2*radius/3);
         private void unpaint(){
              g.setColor(Color.black);
              g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
    }

  • OBIEE + Essbase slow execution

    Hi,
    I'm using OBIEE version 10.1.3.4.1 and Essbase 9.3.1.3 as a data source. I have an Answers report with a certain number of columns that are using AGO, TODATE functions, etc and they work fine. Now I have a need for a column that would also implement a TODATE funcitionality, but for the previous year – for example, if I choose March 2009, I need to show aggregated data for January, February and March of *2008*.
    Since I did not manage to get this just through the OBIEE functions that are available, the solution was to use the EVALUATE_AGGR function with the following expression:
    EVALUATE_AGGR('AGGREGATE(PeriodsToDate(%1,%2.dimension.currentmember.lag(12)), %3)', Time.Year, Time.Month, Accounts.Sales).
    Here I use the Essbase function “Lag” to shift the aggregation 1 year back (12 months).
    This works fine, in that is gives the correct result, however it is very very slow when used in my report that gives cca. 18 columns and cca. 15 rows back as the result.
    Does anyone know why is such report so slow, is it because of the Evaluate function, because of the Lag function or something else?
    Any ideas?
    thank you

    Hey, thanks a lot for a quick answer!
    You are right on both of your assumptions - multiple MDX are indeed fired and we do not have the possibility of chaning Essbase cubes.
    Can you perhaps think of any other way of implementing this "todate for year ago" functionality?
    Is there any way to control how OBIEE generates MDX? Hints maybe or something like that?
    In addition to my first post, I would just like to add that the query is much much faster when I include, as a column in Answers, all the columns on which I apply a filter - example: I'm filtering by dimension "Segmentation", Generations 2 and 3 - when I don't have these coumns in the report itself so that the chosen segmentations are seen as a column, the report is very very slow (initial issue). But when I include them in the report (not just use them in filter), the report becomes very fast and would do fine for us as such. The problem is that I do not need to show the data 'divided' by segmentation (as it is when the columns are in the report, not just filter).
    Edited by: ivo@cro on Mar 22, 2010 1:01 PM

  • OracleCallableStatement - slow execution

    Hello,
    We are facing an issue with performance using OracleCallableStatements to invoke stored procedures.
    The stored procedure has output parameters that are collections of custom defined type objects.What we notice is that while the procedure gets executed in a few seconds, there is significant time taken by the OracleCallableStatement to report back the data.
    Any ideas on what could be a possible cause for this slowness?
    We are on Weblogic 8.1.5, Oracle 10g. We are using SQLJ to map the oracle types to Java objects.
    Thanks!

    Thanks for your response. I tried to set the batch execute attribute on the callable statement object, but did not observe any improvment. From the link mentioned by you, it appears as if you can set the batch execute attribute only on a prepared statement.
    Any other options?
    Thanks again!

  • Slow execution of show_document after fast production of .html file

    When running a report that has a parameter screen, from a form in 10g (10.1.2.0.2), the html document for the parameter screen is almost instantly created in the cache directory. However we have to wait about 30 minutes for the report parameter screen to finally display. When the report is then submitted from the parameter screen, the report output almost instantaneously displays. The hold up looks like in the execution of the show_document statement.
    We are running report using SSO against a secured report server. I'm currently the only user and only one report was being run.
    Does anyone have any ideas of why the .html (parameter screen file) takes so long to display after it is created?
    Ta

    Strangely, your answer amazingly helped lead me to the problem. So thanks very much.
    The only dropdown list was on the destination type - ie Cache, File, Printer and Mail. The only other fields that were populated in the parameter form had their values in the .html file as name=... and value=... attributes. Hence, it wasn't the population of the parameter form causing the problem.
    All the same, your suggestion made us inspect the before parameter form trigger more closely. Found a very quick to run update (one column in one record of a small table) statement - but without a commit - because in the after report trigger it is rolled back. Decided to temporarily make it commit - in order to watch the record via pl/sql to see how long it took to do that step. However, the commit it self made the report parameter form show instantaneously! :)
    All I can conclude is that maybe in 10g (10.1.2.0.2 anyway) if things are not committed in the database maybe there is too much traffic to send between all the bits/tiers/whatever that are needed to run this type of forms, reports, AS etc environment. (If anyone has any light to throw on this it could be really good to know).
    Thanks again for leading us in the right direction - even though it was indirectly. It helped :)
    regards

  • Slow execution after change of entity types

    Because EDM designer generated all number columns as properties of decimal type (I wrote a Use more dot.net types when generate model ) I manually changed types from decimal to (Int32 and Int64), the result is a lot of casts in generated sql and this impacts on query execution
    A query that runs for 20seconds now runs for 110 seconds.
    Example:
    Before (with decimal types)
    SELECT * FROM x
    LEFT JOIN Y ON x.ID = Y.X_ID
    Execution Plan
    SELECT STATEMENT, GOAL = ALL_ROWS               Cost:5447     Cardinality:678     Bytes:548502
    After (with int types)
    SELECT * FROM x
    LEFT JOIN Y ON (CAST(X.ID AS number(18, 0))) = (CAST(Y.X_ID AS number(18, 0)))
    Execution Plan
    SELECT STATEMENT, GOAL = ALL_ROWS Cost:2,24407627155597E16 Cardinality:1,84467440737095E19 Bytes:1,84467440737095E19

    Hi!
    Before:
    In the beggining I have a simple question: do you have "Oracle Data Guard" (or Standby) enabled and running?
    If it's true, can you check this standby is running well?
    If it's false, can you see your database parameters to disable it?
    (please, check LOGSTDBY$PARAMETERS and V$PARAMETER views)
    I've checked your files and it's quite rare. Can you restrict your query to few data (or few tablespaces)?
    After:
    I've checked yor AWR report and I can see this as first "Top 5 events":
    Statistic Name Time (s) % of DB Time
    DB CPU 1,346.59 96.76
    Result: your CPU is doing another thing while your were waiting to the data.
    Possible solution: try to reduce process on this machine or try to launch "important SQLs" at low hours.

  • Feeding dynamic data into formula is causing slow execution and weird results

    I am gathering 11 channels of analog input voltage, then performing a series of (different, editable) calculations on each channel of voltage to convert each to sensor temperature.
    My first stage of calculations (using multiply, subtract, and divide blocks) works fine.
    My second stage of calculations (which includes a natural log "ln") is being performed with the formula block. However, the formula block has three red arrows where the input constants are, and the results of the formula block are intermittent and incorrect (if plotted, the plot just flashes what looks like a value of 1 intermittently... if saved to a csv file, the results show a bunch of zeros and then a row of values, then more zeroes).
    I'm not sure if I need to be converting my dynamic data to an array before feeding into the formula, or if there's some other way applying a complex formula to dynamic data, or...? I'd like to stick with dynamic data because it makes plotting things easier, but I'm open to other suggestions.
    Solved!
    Go to Solution.
    Attachments:
    Capture1.PNG ‏53 KB
    Capture2.PNG ‏20 KB

    Converting from a waveform to a double array makes you lose time information.
    Index Array can be expanded to index out as many items as you need.
    He meant Coercion Dots.  The spellcheck probably went to cocoon.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • OSX 10.9 slows execution of some system apps ??? Using 2008 iMac

    Since implementing OSX 10.9, notable apps like Create PDF's, Screen capture, and one or two 3rd part apps take significantly longer to fully execute ???  I'm presently using a July 2008 21" iMac.  Loading of Microsoft Office applications 5 to 10 seconds longer to load. 

    I wish I had something to offer by way of a fix but I can only say "me too." Restarting the computer is the only fix so far.
    The issue is quite annoying! When working away on something time can pass quickly. Checking on that expected email you've been waiting for you are presented with "Outlook cannot find the server. Verify the server information is entered correctly in the Account Settings, and that your DNS settings in the Network pane of System Preferences are correct."
    When the connection is lost for Outlook it is gone for Mail too.
    I can go days without the issue. Some times it will happen several times in a day. And here's a twist: wait for a few hours to pass and the issue self corrects. The computer is able to find the server again.
    The issue is in the Mac OS Mavericks--not Mail; not Outlook.

  • Slow execution with BEA Weblogic MSSQL Driver from LD

    Any ideas what 3-4 minute delay is from? The stack trace shows it is waiting on the db, but customer says same query executes 'fast' when not executed from LD.
    - Mike
    LD
    I am seeing a strange delay while trying to retrieve data through a database view from MS SQL Server (version : 2000 - 8.00.760) using BEA Weblogic MSSQL Driver version: 3.3.43. Even when I am trying to retrieve a single string record, the query takes more than 3-4 minutes. All other data retrievals against oracle databases all complete within seconds.
    I used p6spy to track the jdbc calls and it reports delay in excess of 3 minutes. If the same query is run from a sql analyzer or as a db ctrl in workshop, it returns in seconds. I tried Dataconect drivers also but same result. Changing the jvm also resulted in same behavior.
    Even a stripped down query shows same amount of delay occurs:
    for $warrantyRep.warranty_info_vw_7 in document("warrantyRep")/db/QADATAPLANADM/dbo/warranty_info_vw
    where ($xf:vin_char_1_9 eq $warrantyRep.warranty_info_vw_7/VIN_CHAR_1_9)
    and ($xf:vin_char_10_17 eq $warrantyRep.warranty_info_vw_7/VIN_CHAR_10_17)
    return
    <ns:warrantyRepair>
    <ns:dealerCode>{ xf:data($warrantyRep.warranty_info_vw_7/DEALER_CODE) }</ns:dealerCode>
    <ns:warrantyRepair>
    This is the direct sql call :
    select * from warranty_info_vw where vin_char_1_9 = 'JTHBF30G3' AND VIN_CHAR_10_17 = '30142268';
    from p6spy logs for the statements invoked by LD:
    1104987465855|15|4|statement||SELECT COUNT(*) FROM sysobjects
    1104987630621|164766|4|statement|SELECT t1."DEALER_CODE"
    FROM "QADATAPLANADM"."dbo"."warranty_info_vw" t1
    WHERE ((?) = (t1."VIN_CHAR_1_9")) AND ((?) = (t1."VIN_CHAR_10_17"))|SELECT t1."DEALER_CODE"
    FROM "QADATAPLANADM"."dbo"."warranty_info_vw" t1
    WHERE (('JTHBF30G3') = (t1."VIN_CHAR_1_9")) AND (('30142268') = (t1."VIN_CHAR_10_17"))
    1104987630621|-1||resultset|SELECT t1."DEALER_CODE"
    FROM "QADATAPLANADM"."dbo"."warranty_info_vw" t1
    WHERE (('JTHBF30G3') = (t1."VIN_CHAR_1_9")) AND (('30142268') = (t1."VIN_CHAR_10_17"))|DEALER_CODE = 62911
    1104987630621|-1||resultset|SELECT t1."DEALER_CODE"
    FROM "QADATAPLANADM"."dbo"."warranty_info_vw" t1
    WHERE (('JTHBF30G3') = (t1."VIN_CHAR_1_9")) AND (('30142268') = (t1."VIN_CHAR_10_17"))|DEALER_CODE = 62911
    1104987630621|264000|3|statement|SELECT t1."DEALER_CODE"
    FROM "QADATAPLANADM"."dbo"."warranty_info_vw" t1
    WHERE ((?) = (t1."VIN_CHAR_1_9")) AND ((?) = (t1."VIN_CHAR_10_17"))|SELECT t1."DEALER_CODE"
    FROM "QADATAPLANADM"."dbo"."warranty_info_vw" t1
    WHERE (('30142268') = (t1."VIN_CHAR_1_9")) AND (('JTHBF30G3') = (t1."VIN_CHAR_10_17"))
    1104987630621|0|4|commit||
    1104987630621|0|3|commit||

    nevermind - I'm am following the instructions in this thread. Sounds like the problem that I have
    http://forums.bea.com/bea/thread.jspa?forumID=2022&threadID=200007092&messageID=200020921&start=-1#200020921

Maybe you are looking for