2

I have a javascript function that is invoked by dwr from server side and processes the response(xml data) in client side. Basically the server side program is executing a large sql script(it could contain more than 10000 sql statements) and call the java script function thru dwr call after execution of each statement. I am getting "Warning: Java script unresponsive error" at arbitrary time during the execution. If I execute less number of statement(~1000 statements) then it executes smoothly without any error. I am not able to find out why the unresponsive message comes.

Client side

function  callback(xml) {
     process_xml_and_display_result
}

Server side

void executeScript(script) {
    for(statement:script) {
        statement_exec_result = execute(statement);
        xml=build_xml(statement_exec_result);
        callback(xml);      
    }
}

Thanks in advance.

  • 1
    Memory issues maybe? Too much changing of the DOM in too short a time? It could be helpful to know what the `callback` function actually does, and how much data is being sent to the browser each iteration. – forgivenson May 12 '16 at 14:20
  • Maybe the call to `process_xml_and_display_result` is wrong? I think that it will need some arguments or, at least, yo need to call it with some parenteses `()` – dlopez May 12 '16 at 14:25
  • `callback` function is displaying the executed statement status as log(in a div) and also it displays the result if any, as table with navigation. The volume of xml data is not so much. xml having statement status, execution result information and very few flag values. @forgivenson – Prajee Praju May 13 '16 at 05:31
  • Again, it would be useful to see what `callback` does. Meaning, please add the actual code, and any html it interacts with. – forgivenson May 13 '16 at 14:52
  • The `callback` function is too large because it handling different type of responses. So I am not able to provide the code because of the comment box limitation. – Prajee Praju May 16 '16 at 10:25

0 Answers0