VL WEb Browser Console Messsage (RESOLVED)

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
soa
Posts: 300
Joined: Mon Dec 07, 2015 3:15 pm

VL WEb Browser Console Messsage (RESOLVED)

Post by soa » Thu Aug 22, 2019 4:06 pm

I'm seeing message in the Chrome console

[Violation] 'readystatechange' handler took 175ms

lansa.js 12

What is that all about?

soa
Posts: 300
Joined: Mon Dec 07, 2015 3:15 pm

Re: VL WEb Browser Console Messsage

Post by soa » Thu Aug 22, 2019 6:36 pm

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

jyoung
Posts: 651
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: VL WEb Browser Console Messsage

Post by jyoung » Thu Aug 22, 2019 11:37 pm

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

dannyoorburg
Posts: 156
Joined: Mon Jan 04, 2016 9:50 am
Location: Australia

Re: VL WEb Browser Console Messsage

Post by dannyoorburg » Fri Aug 23, 2019 5:39 am

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

soa
Posts: 300
Joined: Mon Dec 07, 2015 3:15 pm

Re: VL WEb Browser Console Messsage

Post by soa » Fri Aug 23, 2019 8:35 am

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

dannyoorburg
Posts: 156
Joined: Mon Jan 04, 2016 9:50 am
Location: Australia

Re: VL WEb Browser Console Messsage (RESOLVED)

Post by dannyoorburg » Fri Aug 23, 2019 9:23 am

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

Post Reply