cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not a customer? Start a free trial

Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.

AppDynamics customers and established members should click the sign in button to authenticate.

Knowledge Base

Why is adrum.js loaded synchronously while adrum-ext.js is loaded asynchronously?

Question

Why is adrum.js loaded synchronously while adrum-ext.js is loaded asynchronously?

 

Answer 

The JavaScript Agent is designed in two pieces to expedite loading and minimize impact. 


- Adrum.js loads synchronously: This is done to avoid any miss in the EUM metrics collection. The later adrum.js is loaded, the more items can be missed (resource loads like XHR calls, for example), moreover the file size is minimal. This part of the agent kicks off the loading of adrum-ext.js, via an asynchronous call.


- Adrum-ext.js loads asynchronously: At the onload event, adrum-ext.js is fetched asynchronously specifically to not block page load. This is the code that does most of the heavy lifting. Once it has been fetched, it is cached for 24 hours on the browser. When the page has completed loading, the collected data is bundled into a beacon and sent to the EUM Cloud by adrum-ext.js. Again asynchronously.

 

Note: Since adrum.js is invoked synchronously, any failures in connectivity will impact the page load times directly, whereas adrum-ext.js is invoked asynchronously so the browser page load won't be blocked. 

Version history
Last update:
‎10-12-2018 02:32 PM
Updated by:
Labels (1)
Tags (2)


Found this article helpful? Click the Thumbs Up button.
Have an additional comment? Post it below.
By replying you agree to the Terms and Conditions of the AppDynamics Community.