Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-5820

Restrict anti-flicker snippet to A/B element

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Released
    • Icon: Should have Should have
    • 2.47.0
    • None
    • 5
    • Performance, Testing
    • Sprint #152
    • deimos

      Having the anti flicker snippet on causes a significant white flash on almost every page load.

      We should probably disable the snippet asap unless the test really depends on it. It's highly likely the flicker is less severe than the white screen.

       

      Detailed description

      Last week for experimentation day I looked into generating our AB test variants using Cloudflare workers, for which I checked how we currently do AB tests. I noticed that we have the anti-flicker snippet on pretty much by default on all sites, but people are probably not aware of the major performance impact that has. It effectively shows a white screen to the user until the test is applied to the page, on every page load.
       
      Without the snippet our pages load roughly in 100 ms (i.e. browser is ready to show something, not completely loaded) and there is no flash at all. With the snippet you add to that the response time (EDIT: not sure if this is actually just the response time, could be something else makes it take long) for Google Tag Manager which has the test data. This response time varies a lot, on average it's around 1000ms, and can be up to 4000ms, 40 times as long as are regular page load. It can also be a lot worse in regions where the tag manager response times are longer.
       
      This means that without the snippet on each page navigation is seamless with no white flash, while with the snippet it's very rare for the page not to flash.
       

            pvincent Pieter Vincent
            pvincent Pieter Vincent
            Julia Marubayashi Julia Marubayashi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: