Page 1 of 1

VL WEb Browser Console Messsage (RESOLVED)

Posted: Thu Aug 22, 2019 4:06 pm
by soa
I'm seeing message in the Chrome console

[Violation] 'readystatechange' handler took 175ms

lansa.js 12

What is that all about?

Re: VL WEb Browser Console Messsage

Posted: Thu Aug 22, 2019 6:36 pm
by soa
From the looks of my logging this looks like it happens when I make a server module call.

I don't know what makes that a violation though as 175ms seems pretty quick.
I'm also sometime seeing

[Violation] 'setTimeout' handler took 67ms

Re: VL WEb Browser Console Messsage

Posted: Thu Aug 22, 2019 11:37 pm
by jyoung
Chrome thinks the scripts are blocking the UI to much.

There are quite a few posts on StackOverflow about it mainly from a couple years ago when Chrome introduced the feature.

Here are a couple:

https://stackoverflow.com/questions/432 ... est-chrome
https://stackoverflow.com/questions/412 ... took-xx-ms

The entries themselves have links to other resources about it.

I don't think there is anything you can really do about it since we are not the ones writing the javascript.

Joe

Re: VL WEb Browser Console Messsage

Posted: Fri Aug 23, 2019 5:39 am
by dannyoorburg
Hi,

What you can control from RDMLX though is whether or not your server module call is asynchronous.

A synchronous call blocks the JavaScript execution/UI thread and should generally be avoided.

If this particular case is already asynchronous it would be interesting to see what causes so much code to run around that call....

Cheers,
Danny

Re: VL WEb Browser Console Messsage

Posted: Fri Aug 23, 2019 8:35 am
by soa
I wasn't sure whether the messages were coming from LANSA or not since it referenced lansa.js.

The server module calls are definitely asynchronous although the times reported 175- 200+ ms are in line with what I expect the call to take. The server method in question is getting a couple of largelish lists and mapping them into the model.

Anyway doesn't seem to affect anything - I was just curious.

Cheers
Jim

Re: VL WEb Browser Console Messsage (RESOLVED)

Posted: Fri Aug 23, 2019 9:23 am
by dannyoorburg
Hi Jim,

So what it's actually saying is that the processing of the request-completed logic took too long for its liking.

It's reporting lansa.js because as far as the browser is concerned that's where the event handler is, that it results in an RDMLX event and therefor RDMLX running is beside the point.

We'll always do our utter best to make RDMLX compile into the best performing JavaScript possible, but of course we can never stop people writing RDMLX that takes a significant time to execute (not that 175 ms is a showstopper)

Anyway, this is just Chrome being a bit pedantic and trying to teach the world how to write highly responsive web applications... just ignore it if there's no actual problem :)

Cheers,
Danny