Script long execution

I have implemented a basic login screen and its working ok except that it's giving me this error and is taking long to execute:
Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
    at login_screen/Checklogininfo()[login_screen::frame1:34]
Script is the following:
login_error_lbl.visible = false;
login_ok_btn.addEventListener (MouseEvent.CLICK,Checklogininfo);
function Checklogininfo (event:MouseEvent):void
    while ((User_name_txtbox.text != "xx") || (Password_txtbox.text != "y")){
        login_error_lbl.visible = true;         /////////////////////////////////////////this part of the "while" is taking very long to execute
        User_name_txtbox.text = "";
        Password_txtbox.text = "";
    this.visible = false;
Any ideas how I can go about it?  Thanks!

Perhaps something like this. The credentials are checked each time login_ok_btn is clicked.
login_error_lbl.visible = false;
login_ok_btn.addEventListener (MouseEvent.CLICK,Checklogininfo);
function Checklogininfo (event:MouseEvent):void
   var loginValid:Boolean = ((User_name_txtbox.text == "xx") &&  (Password_txtbox.text == "y"));
// don't know if you really want to clear these fields
// might want to just leave them alone so the user can see what was typed
   User_name_txtbox.text = "";
   Password_txtbox.text = "";
   this.visible = login_error_lbl.visible = !loginValid;

Similar Messages

  • Alert with event for delayed job and long execution time

    Dear All,
    We are planning to send alert via email in case job delayed or long execution time.
    I have followed below steps:
    1) Create event Raise Event when job is delayed.
    2) create job chain with STEP1, Job 1 and assign event in raise event parameter.
    3) Once job chain delayed it should raise events.
    4) Above event should trigger custom email but I can not put the Mail_To parameter as IN parameter. And can not be recognized during
    execution.
    It ends with the below error.
    Details:
    JCS-122035: Unable to persist: JCS-102075: Mandatory parameter not set: Parameter Mail_To for job 20413
    at com.redwood.scheduler.model.SchedulerSessionImpl.writeDirtyListLocal(SchedulerSessionImpl.java:805)
    at com.redwood.scheduler.model.SchedulerSessionImpl.persist(SchedulerSessionImpl.java:757)
    Please let us know if anybody knows how to add Mail_To parameter to script.
    Any help is appreciated.
    Thanks in advance.
    Regards,
    Jiggi

    Dear Jiggi,
    where will you define execution time of particular job? because some jobs will take only 1 or 2 minutes, but some jobs normally take more than hours, so how will you decide execution time of individual jobs?
    i thinks you can use P_TO Parameter for sending mail, if you want to add some output log activate spool output script.
    Thanks and regards
    Muhammad Asif

  • Cannot load script for execution.

    hi 
     iam creating  the  sisi package  with in script task . script task   was  build successful .  but when i was executive the ssis packages vs 2012.
     it get  error :Cannot load script for execution..
     the code is 
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    using System.IO;
    namespace ST_8cdbf584a74b48abb384d8f03cf42f4d.csproj
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
    The execution engine calls this method when the task executes.
    To access the object model, use the Dts property. Connections, variables, events,
    and logging features are available as members of the Dts property as shown in the following examples.
    To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
    To post a log entry, call Dts.Log("This is my log text", 999, null);
    To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
    To use the connections collection use something like the following:
    ConnectionManager cm = Dts.Connections.Add("OLEDB");
    cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
    Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
    To open Help, press F1.
            public void Main()
                byte[] dataByte = null; String errInfo = "";
                try
                    String sDirectory = Dts.Variables["User::Directory"].Value.ToString();
                    String CreatePartitionFileXMLA = sDirectory + "\\partitionssales20010701to20010731.XMLA";
                    String ProcessPartitionFileXMLA = sDirectory + "\\partitionssales20010701to20010731.XMLA";
                    // Create XMLA Script
                    Dts.Variables["User::CreatePartitions"].Value = ReadFile(CreatePartitionFileXMLA, errInfo);
                    if (errInfo.Length > 0)
                        Dts.Log("Error while reading XMLA file: " + errInfo, 0, dataByte);
                        Dts.TaskResult = (int)ScriptResults.Failure;
                    //Process XMLA Script
                    Dts.Variables["User::ProcessPartitions"].Value = ReadFile(ProcessPartitionFileXMLA, errInfo);
                    if (errInfo.Length > 0)
                        Dts.Log("Error while reading XMLA file: " + errInfo, 0, dataByte);
                        Dts.TaskResult = (int)ScriptResults.Failure;
                    Dts.TaskResult = (int)ScriptResults.Success;
                catch (Exception ex)
                    Dts.Log("Error Message: " + ex.Message, 0, dataByte);
                    Dts.TaskResult = (int)ScriptResults.Failure;
            public String ReadFile(String FilePath, String ErrInfo)
                String strContents;
                StreamReader sReader;
                try
                    sReader = File.OpenText(FilePath);
                    strContents = sReader.ReadToEnd();
                    sReader.Close();
                    return strContents;
                catch (Exception e)
                    MessageBox.Show(ErrInfo);
                    ErrInfo = e.Message;
                    return "";
     how to solve this issue
     pleasse help me..

    Hi sheshu0022,
    Based on my research, the issue can be occurred due to something get corrupted in the script task. To fix this issue, please copy the code in the task, then rebuild the script task with the same code to test again.
    The following similar thread is for your reference:
    http://stackoverflow.com/questions/15165760/ssis-script-task-fails-on-server-with-error-cannot-load-script-for-execution
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Long execution times for TestStand conditional statements

    I have two test stations – one here, one at the factory in China that has been operating for about a year. The test program uses TestStand 3.1 and calls primarily dll's developed using CVI. Up until a couple months ago, both test stations performed in a similar manner, then the computer at the factory died and was replaced with a new, faster computer. Now the same test sequence at the factory take three times as long to execute (30 min at the facotry, 10min here).
    I have recoded the execution time at various point during the execution, and have found that the extra times seems to be occurring during the evaluation of conditional statements in TestStand (i.e. for loops, if statements, case statements). For example, one particular ‘for’ evaluation takes 30 ms on the test station here, but takes 400 ms at the test station at the factory (note: this is just the evaluation of the for condition, not the execution of the steps contained within the for loop).
    The actual dll calls seem to be slightly faster with the new computer.
    Also the ‘Module Times’ reported don’t seem to match the actual time for the module for the computer at the factory. For example, for the following piece of TestStand code:
    Label1
    Subsequence Call
    Label2
    I record the execution time to the report text in both Label1 and Label2. Subtracting one from the other gives me about 18 seconds. However the ‘Module Time’ recorded for ‘Subsequence Call’ is only 3.43 seconds.
    Any body have any ideas why the long execution time with the new computer? I always setup the computers in exactly the same way, but maybe there is a TestStand setting somewhere that I have missed? Keep in mind, both test stations are running exactly the same revision of code.

    Got some more results from the factory this morning:
    1) Task Manager shows that the TestExec.exe is the only thing using CPU to any significant degree. Also CPU Usage History show that the CPU Usage never reaches 100%.
    2) I sent a new test program that will log test execution time in more places. Longer execution times are seen in nearly every area of the program, but one area where this is very dramatic is the time taken to return from one particular subsequence call. In this subsequence I log the time just before the <End Group> at then end of Main. There is nothing in Cleanup. I then log the time immediately after returning from this sequence. On the test system I have here this takes approximately 160 ms. On the test system at the factory this takes approximately 14.5 seconds! The program seems to be hanging here for some reason. Every time this function is called the same thing happens and for the same amount of time (and this function is called about 40 times in the test program, so this is kill me).

  • Optimize long execution time due to 'db file sequential read'

    Hi to all,
    I have got a query that takes long execution time. Most of the time is due to 'db file sequential read'. The query is:
    SELECT * FROM Table_Name
    WHERE col1 = :some_value
    AND col2 BETWEEN :some_range_about_2_Million
    | Id | Operation | Name | Rows | Bytes | Cost |
    | 0 | SELECT STATEMENT | | 21 | 504 | 26125 |
    | 1 | TABLE ACCESS BY INDEX ROWID| Table_Name | 21 | 504 | 26125 |
    | 2 | INDEX RANGE SCAN | Index Name | 1705K| | 4100 |
    The table is not partitioned having around 0.2 billion records. Record set for column 'col1' is around 1700K.
    Another index is available for the col2 and col3 is not getting used.
    Any suggestions to optimize it..
    Regards.

    Perhaps a combined index (col2, col1) would work...or try "parallel" hint.
    :p

  • Reg sap script long text

    Hi experts,
    I have one problemin bseg-sgtxt field. i develop sap script for payment print prog, In my script my field is bseg-sgtxt(item text). and this field lenght is 50 char. i want more then 50 char through this field in my script. for that i use long text button... this long text stored in EENO_DYNP and field name is ZEILE , but it is a structure...so my question is
    1) How can i retrive this long text field in my script
    2) Can u give me example with this coding..
    3) How can i concate bseg-sgtxt with EENO_DYNP-ZEILE
    I need code example for that....
    Pl help me its urgent
    zeni

    hi,
    the long text of a document are stored into the standard text table and u can read it with the function READ_TEXT.
    call this function in this way
    >CONCATENATE bseg-bukrs bseg-belnr bseg-buzei INTO name.
    >CALL FUNCTION 'READ_TEXT'
    >  EXPORTING
    >    id                      = '0001'
    >    language                = sy-langu
    >    name                    = name
    >    object                  = 'DOC_ITEM'  " identified FI document
    >  TABLES
    >    lines                   = t_line
    >  EXCEPTIONS
    >    id                      = 1
    >    language                = 2
    >    name                    = 3
    >    not_found               = 4
    >    object                  = 5
    >    reference_check         = 6
    >    wrong_access_to_archive = 7
    >    OTHERS                  = 8.
    the id of the text you can find in SPRO transaction under
    Financial accounting->Financial accounting Global Settings ->Document->line Item-> Define Text Identifications for Line Items
    here you can find all ID of the standard text that are configurated in your system.
    now you can concatenate BSEG-SGTXT with the standard text of the document item .
    bye
    Marco

  • Extreme long execution time

    Hi,
    lately, I realized that Jubula needs extremely long for all the progresses...
    For example, deleting TestResults or after execution of TestCases, the Progress "Collecting Information" and "Writing Report to Database" needs about 15-20 minutes!!
    I use the embedded database and html toolkit and my project is not big at all!
    I already had larger projects and never experienced that long progresses!
    Any ideas/suggestions why Jubula is suddenly working that slow?
    Thanks

    Hi Nicole,
    Thanks for your question! I think the problem is that the h2 database isn't designed for productive use - it doesn't scale well and will indeed get slower and slower with time (not necessarily size of the project, just time).
    If you need to keep using it then you can do the following:
    - stop Jubula
    - perform an export all to export all of the projects
    - you can also copy the database files (from your home directory under .jubula) to back them up
    - delete the database files from your home directory
    - connect to the database: this will recreate the database
    - then you can import the projects you exported
    Like I say, this isn't the preferred way of working, but the steps above should help with the current performance. Bear in mind that you should ensure that you have backups before you delete the database!
    Hope that helps,
    Alex

  • Issues in Coded UI Test Script bulk execution

    Hi,
           We are using Coded UI  for one of the dotnet web application in our project. We have automated more than 1000 scenarios using Coded UI.  We are using the 4.0 framework.  We have created multiple order tests(OT) with
    80 test scripts in an order test file and give it for execution.
           We have observed that few of the scripts which gets successfully executed in the debug and Run mode are getting failed while executing the same using the order tests. However, if we re-create a new order test by putting the failed
    script as the first script in the order test, then the script is getting passed in the execution, but the others are getting failed.  PFB the example,
    Suppose OT1 has T1,T2,T3 scripts in the same order i,e T1,T2,T3.  all the scripts i,e T1,T2,T3 run perfectly and gets passed individually in the debug mode and run mode.  But if we execute the OT1 using the MsOrderTest Batch file, then only T1
    is getting passed and T2 and T3 are failed.
    In another scenario, if the scripts are ordered as T2,T3 and T1. Then after the OT execution, the result is only T2 is passed, T3 and T1 are failed.
    I could not understand why the scripts are getting failed. Can someone provide some help here. 
    Please note:: All the scripts are hand written and not the recorded ones.
    Thanks,
    Venkat.

    Hi Venkat,
    >> Suppose OT1 has T1,T2,T3 scripts in the same order i,e T1,T2,T3.  all the scripts i,e T1,T2,T3 run perfectly and gets passed individually in the debug mode and run mode.  But if we execute the OT1 using the MsOrderTest Batch file, then
    only T1 is getting passed and T2 and T3 are failed.
    Could you share us the error message screen shot or the details error message about the T2 and T3?
    Based on your description, it seems that it caused by the script. To find the root cause, I will recommend you run the Order Test in the Visual studio. If it could work correctly, I assume that there is something wrong in the script, and it would be helpful
    if you could share us the script. The link below shows how to run tests from Visual Studio.
    # How to: Run Tests from Microsoft Visual Studio
    https://msdn.microsoft.com/en-us/library/ms182470.aspx
    In my option, you could replace the T1,T2,T3 with other three simple methods in the class to check whether the script could work correctly.
    In addition, I will recommend you to try to run the T1,T2,T3 independent to check whether the result web page of T1 is not the start of the T2.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • IE11 bug - javascript script continues execution after the tab is closed

    Steps to reproduce:
    1. Open 2 blank tabs in IE.
    2. In one of them navigate to this demo page: http://jsfiddle.net/MTJ27/15/ ; it runs 4 web workers in a loop.
    3. Check the CPU utilization (on a 8-core machine it should show 50%, for 4 cores or less: 100%).
    4. Close the tab that displays the demo page; leave the other tab open.
    5. Check the CPU utilization again -> it doesn't drop! IE still runs these web workers (IMO).
    It's a bug,  isn't?
    Regards,
    Robert

    Hi,
    Could you please have a share with the steps about how to reproduce the "bug" you mentioned?
    I could not run the scripts under the shared URL (The run button seems not work here).
    Another thing that we might take a try is to end the same task under Task Manager, and then check if the symptom would be the same.
    For debugging scripts, or writing scripts that would work in a webpage, we may take use with the F12 debug tool:
    Using the F12 developer tools
    Best regards
    Michael Shao
    TechNet Community Support

  • Long execution time.

    Hi,
    Can anyone see a problem with the below query it is taking a long time to execute in SQL developer
    select ol.sku_id, oh.order_id
    from order_header oh, order_line ol
    where ol.qty_tasked <= 0 or ol.qty_picked <= 0
    and oh.order_id = ol.order_id
    and oh.order_id = '9150391359'
    and oh.client_id = ol.client_id
    group by oh.order_id, ol.sku_id
    order by ol.sku_id#
    Regards,
    Sam.

    You can try something like this:
    select
        ol.sku_id, oh.order_id
    from
        (select order_id, client_id
         from order_header
         where order_id = '9150391359') oh,
        (select order_id, client_id, skew_id
         from order_line
         where qty_tasked <= 0 OR qty_picked <= 0) ol
    where
        oh.order_id = ol.order_id  AND
        oh.client_id = ol.client_id
    group by
        oh.order_id, ol.sku_id
    order by
        ol.sku_idThis will reduce the number of rows before the join and may speed things up.

  • Very very long execution time

    hi,
    working with 10g XE
    new_header table has 9749 rows and consist of two column : itemsets and codes like that
    AST:GLU:KREA:Na:IBIL, 2380. codes starts from 1 to 9749
    when I run belows pl/sql codes, it takes very long time in fact it can not be complete without error
    declare
    cnt1 number(15) ;
    cnt2 number(15) ;
    itemset1 varchar(800) ;
    itemset2 varchar2(800) ;
    begin
    select max(codes) into cnt1 from new_header ;
    cnt2 := cnt1 ;
    for f in 1..cnt1 loop --cnt1 loop
    for l in 1..cnt2 loop --cnt2 loop
    itemset1 := 'AST:GLU:KREA:Na:TBIL:IBIL' ; ---given for exeample
    --select itemsets into itemset1 from new_header where codes = f ;
    insert into k1
    select REGEXP_SUBSTR (itemset1,'[^:]+', 1, level)
    from dual
    connect by level <= length(regexp_replace(itemset1 ,'[^:]*'))+1 ;
    select itemsets into itemset2 from new_header where codes = l ;
    insert into k2
    select REGEXP_SUBSTR (itemset2,'[^:]+', 1, level)
    from dual
    connect by level <= length(regexp_replace(itemset2 ,'[^:]*'))+1 ;*/
    check_it ;
    commit ;
    end loop ;
    end loop ;
    dbms_output.put_line(myres.count) ;
    end ;
    I wanto to get each part of itemset1 seperated by : k1 global temporary table has one column varchar2 will be used in check_it procudere to compare with a table values. please give me some advice urgent..what can i do. what can I use instead of regexp_substr or any idea..thanks..

    The regexp_substr isn't the problem.
    The problem is your table has 9749 rows and you're doing this:
    for f in 1..cnt1 loop --cnt1 loop
    for l in 1..cnt2 loop --cnt2 loop
    end loop ;
    end loop ;i.e. you are trying to execute the code in the loops 9749^2 which is roughly 95 million times. And you wonder why its taking a long time.
    I havn't even tried to work out what you are trying to achieve in the rest of the code - maybe you could elaborate.
    I suggest you rethink your approach to the problem though. Oh, and no, it's not urgent.

  • BAPI performance low- taking too long execution time

    Hi,
    I am using BAPI "BAPI_MOSRVAPS_GETLIST2" for reading planned order details but its taking to long to execute (3-4 mins approx  for 3-4 products). Please suggest me how to improve the performance of it. Input for the BAPI :
    Import Parameters
    Tables (Input)
    PRODUCT_SELECTION
    LOCATION_SELECTION
    *Tables(Output)*
    ORDER_HEADS
    PEGGING_OUTPUT_NODES
    Thanks ,
    Roopesh

    Hi,
    If possible give values for locations , location types .
    Please also check if you can give order ATP category.
    This should give faster extraction of data.
    Regards
    Datta

  • Long execution of 'no. of entries'

    Hi,
    I had z-table with huge no. of entries. I somehow managed to delete all entries. however in se16 if i click on 'no. of entries' tab , the system takes a lot of time & then displays '0 records' . Can anyone help me ?
    Bye

    Hi,
    are you sure your table is really empty? (think of other clients)
    Or is just the data of this client you are loged in not existing anymore?
    If it is really empty and you can be sure that you don't need any data
    of any client:
    Go To SE14 - enter table name - edit
    mark "delete data" and click "Activate and adjust database"
    The table is "truncated" then... all of the allocated table and indexblocks
    are freed back to the database system (for other tables).
    If you delete in your ABAP programm only a logical delete is done.
    All blocks stay allocated for this table and its indexes and can only
    be reused by this table.
    If your count does a table or index full scan... it runs much longer if
    the number of allocated (but empty) blocks is high. In this case
    you can speed it up by removing the allocated (empty) blocks from
    the table and indexes with SE14 as pointed out above.
    Kind regards,
    Hermann

  • Long execution for Full optimize?

    Hi!
    Do anyone know how long a normal executiontion time for full optimize is? And what you can do to speed it up?
    We have an application with about 5 000 000 records in the Fact table. We have scheduled 8 imports every day which creates about 100 000 records for every import in the Fac2 table. And we have sheduled one full optimize every night and this optimize takes about 45 minutes, is this normal for this number of records in the tables.

    That's about how long our optimizes take with our 9m record fact table.
    The fewer the records, the shorter the optimize so you can look into partitioning and archiving if you would like to shorten the optimize time.

  • LabVIEW2012 has long execution time to write string than LabVIEW2011 on XP SP3

    in for loop, each execution will output string and display it on front panel by value property.
    But after upgrade to LabVIEW 2012, the execution time doubled on Chinese XP OS, I really want to know this difference between LabVIEW 2011 & LabVIEW 2012, pls advice.
    "I think therefore I am"

    This is no way to measure the execution time. Your parallel while loop spins as fast as the computer allows, consuming all CPU it can get in the process, and starving everything else. Your code is highly flawed!
    Eli: actually I add 10milliseconds delay inside both for and while loop. 
    In addition, get date/time in seconds is also a relatively expensive function, not to mention all these local variables! Your benchmark is completely meaningless! All it does is slow down your regular code, nothing else. How do you know in what order things start? Where is the "start time" initilized (where is the terminal?!)
    Eli: I am using the states machine, and set the "start time" during the program initialization, then calculate "test time"in next case (running block). 
    A proper benchmark uses a three-frame flat sequence with to high resolution relative seconds timers, on in each outer frame and the code to be benchmarked in the inner frame. (here is an example). The difference between the two timers is the exection time of the inner code in seconds. Make sure to only have wires in the benchmarking code. All controls and indicators belong outside the sequence. Also make sure that no other code can run in parallel to the sequence.
    Use this and you'll be surprise how fast your code actually runs.
    Then you should also disabele debugging.
    Please attach your actual code (including the subVI) so we can see what else you are doing wrong.
    Eli: if possible, give me your mail address, then I can sent more actual code to you separately. 
    "I think therefore I am"

Maybe you are looking for

  • Mode not supported when trying to connect mac to tv

    I'm trying to connect my Mac to the TV as I do nearly every day using my HDMI cable via the apple HDMI adaptor (don't know exactly what that cable is called). But when I try it cuts in and out in fuzziness for a bit then eventually comes up with the

  • XI does not allow me to add new segment....?

    Hi, I created a message from XSD...The XSD allows one node to be repeated say 5 number of times. But when I create the Message out of this XSD, it has just one node for this .Now I want to create another similar node... Any idea how  to do that? Than

  • Auto Logoff while in Shared Services Security Mode

    Pretty simple question but I still haven't found the answer. My client's essbase server is set up in Shared Services Security Mode, so now the auto logoff options for the server don't apply. Is there a way to set this via shared services? Or is there

  • Funds posted 3x for 1 iPhone 5 preorder. Anyone else???

    Transaction (#1) posted to my bank account yesterday that funds had been removed for my iPhone preorder. When I logged on today, it showed that the transaction posted 3!!!!! times. I have B of A, it shows the transactions are "processing" but the fun

  • Preload record in form

    Can I preload a record in a form, e.g. I select the record in a list and I get the selected record in the form with the Update/Delete button available. (I like the Pass Parameter between Portlets sample from this forum by Jerry Silver, for displaying