Jump to content
Sign in to follow this  
scalemates

Remove fl.js for better JS performance

Recommended Posts

Hi,

Background:

All the banners I server are either images or HTML and there is 0% chance I serve flash.

While doing a performance review of my JS code I noted the standard Revive JS code (served via /asyncjs.php) contained a whole section of JS referencing ShockwaveFlash.ShockwaveFlash

Checking the asyncjs.php source I see it includes a reference to a required flash config file (fl.js in the /www/delivery folder)

require __DIR__.'/'.$GLOBALS['_MAX']['CONF']['file']['asyncjsjs'];
require __DIR__.'/'.$GLOBALS['_MAX']['CONF']['file']['flash'];

I currently commented out the inclusion of the fl.js so the JS is smaller. All seems to work fine.

Results

  • asyncjs.php goes from 3.6KB to 2.0Kb when transferring over the wire (GZIP). (not massive, but with Chrome never slow mode, you only have a certain budget of JS available. Saving 1.6Kb here can help to stay under the 500kb limit)
  • 9883 bytes to 42993 bytes in unzipped format. (this is less JS code to parse/execute. Read The Cost Of JavaScript In 2018 for more details https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4

 

My 3 questions for the community are?

  • Do you know any side effects of removing the fl.js inclusion? 
  • Are there better options than commenting it out?
  • Are there other JS optimisations you are aware off?

Thank you

Tim

 

Edited by scalemates

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  



×