sjivan / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 0 forks source link

function $onResponseReceived in generated jsp uses 100% cpu. #512

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
function $onResponseReceived(this$static, response){
  var $e0, caught, e, encodedResponse, result, statusCode;
  result = null;
  caught = null;
  try {
    encodedResponse = response.val$xmlHttpRequest.responseText;
    statusCode = response.val$xmlHttpRequest.status;
    !!$stats && $stats($moduleName, 'rpc', this$static.methodName + ':' +
this$static.requestId + ':responseReceived',
bytesStat(this$static.methodName, this$static.requestId,
encodedResponse.length));
    if (statusCode != 200) {
      caught = $StatusCodeException(new StatusCodeException(),
encodedResponse);
    }
     else if (encodedResponse == null) {
      caught = $InvocationException(new InvocationException(), 'No response
payload');
    }
     else if (encodedResponse.indexOf('//OK') == 0) {
      result =
this$static.responseReader.read($createStreamReader(this$static.streamFactory,
encodedResponse));
    }
     else if (encodedResponse.indexOf('//EX') == 0) {
      caught =
dynamicCast($readObject($createStreamReader(this$static.streamFactory,
encodedResponse)), 140);
    }
     else {
      caught = $InvocationException(new InvocationException(),
encodedResponse);
    }
  }
   catch ($e0) {
    $e0 = caught_0($e0);
    if (instanceOf($e0, 16)) {
      caught = $IncompatibleRemoteServiceException(new
IncompatibleRemoteServiceException());
    }
     else if (instanceOf($e0, 140)) {
      e = $e0;
      caught = e;
    }
     else 
      throw $e0;
  }
   finally {
    !!$stats && $stats($moduleName, 'rpc', this$static.methodName + ':' +
this$static.requestId + ':responseDeserialized',
timeStat(this$static.methodName, this$static.requestId));
  }
  try {
    if (!caught) {
      this$static.callback.onSuccess(result);
    }
     else {
      this$static.callback.onFailure(caught);
    }
  }
   finally {
    !!$stats && $stats($moduleName, 'rpc', this$static.methodName + ':' +
this$static.requestId + ':responseCallbackDone',
timeStat(this$static.methodName, this$static.requestId));
  }
}

Above javascript code get generated with the var $gwt_version = "1.5.0";

!!$stats && $stats($moduleName, 'rpc', this$static.methodName + ':' +
this$static.requestId + ':responseCallbackDone',
timeStat(this$static.methodName, this$static.requestId));

Above line takes 100% CPU resources. Why that is?

What is the expected output? What do you see instead?
It's should not use 100% CPU.

What version of the product are you using? On what operating system?
var $gwt_version = "1.5.0"
OS:XP
Browser: IE6

Please provide any additional information below.
I are trying to just move the node up or down in a tree and when above
function call uses 100% CPU. This is very high severity issue for us.   

Original issue reported on code.google.com by praful.rajawat on 8 Oct 2009 at 5:07

GoogleCodeExporter commented 8 years ago
Any clue? Anybody ?

Original comment by praful.rajawat on 12 Oct 2009 at 7:46

GoogleCodeExporter commented 8 years ago
The test case runs much faster, less than 5 seconds in Google Chrome and/or 
Firefox
as compared to 45 seconds when using Internet Explorer 6.0 or 7.0. 
In case someone is looking for alternative.

Thank you

Original comment by praful.rajawat on 15 Oct 2009 at 3:50