Hi Carl, sorry to be the bearer of bad news, but i’ve just tested this and it’s actually made our load times worse and increased them by more than 2x.
I took 2 GIF screencaptures at 30fps (nominal, the app [https://www.screentogif.com/] I use I believe does some smarts to work out if frames have changed or not to discard duplicates) when loading the same screen with the load-ahead enabled and disabled. I cut these animations down to only the frames where the page was loading from start to end, and the results are below.
Edit: I just added an additional two tests performed right on the server itself in Chrome.
What I found was that when the load-ahead option is enabled, the loading icon overlay ( ) actually displayed for approximately the time it took for the disabled option to fully load the page (for one run, the loading icon overlay displayed for 2220ms, then the tag bindings took another 2740ms to load once the loading overlay disappeared).
Total frame time: (35, 4720) <-- 35 frames, 4720ms in total load time
File: Perspective 8.1.5 speed increase comparison - New TF FS - Active - TF Detail Only.gif
Total frame time: (35, 4960)
File: Perspective 8.1.5 speed increase comparison - New TF FS - Active - TF Detail Only 2.gif
Total frame time: (47, 6140)
File: Perspective 8.1.5 speed increase comparison - New TF FS - Server Client - Active - TF Detail Only 1.gif
Total frame time: (51, 6060)
File: Perspective 8.1.5 speed increase comparison - New TF FS - Server Client - Active - TF Detail Only 2.gif
Total frame time: (31, 2230)
File: Perspective 8.1.5 speed increase comparison - New TF FS - InActive - TF Detail Only.gif
Total frame time: (35, 2340)
File: Perspective 8.1.5 speed increase comparison - New TF FS - InActive - TF Detail Only 2.gif
Total frame time: (35, 2900)
File: Perspective 8.1.5 speed increase comparison - New TF FS - Server Client - InActive - TF Detail Only 1.gif
Total frame time: (39, 2750)
File: Perspective 8.1.5 speed increase comparison - New TF FS - Server Client - InActive - TF Detail Only 2.gif
This is the python code I used to calc the total frame times (stolen mostly from here [Get frames per second of a gif in python? - Stack Overflow]) For those wanting to actually use this, I had to install the ‘pillow’ library instead of the ‘PIL’ library, and I ran it in PyCharm with Python 3.9:
import os
from PIL import Image
import tkinter as tk
from tkinter import filedialog
def choose_file():
root = tk.Tk()
root.withdraw()
file_path = filedialog.askopenfilename(filetypes=[('GIF', '*.gif')])
return file_path
def get_frame_time(PIL_Image_object, startFrame=None, endFrame=None):
""" Returns the total time of the of a PIL Image object """
if startFrame is None:
startFrame = 0
if endFrame is None:
endFrame = -1
PIL_Image_object.seek(startFrame)
nextFrame = 0
frames = duration = 0
while endFrame == -1 or nextFrame <= endFrame:
try:
frames += 1
this_duration = PIL_Image_object.info['duration']
duration += this_duration
PIL_Image_object.seek(PIL_Image_object.tell() + 1)
nextFrame = PIL_Image_object.tell()
except EOFError:
return frames, duration
return frames, duration
def get_avg_fps(PIL_Image_object):
""" Returns the average framerate of a PIL Image object """
PIL_Image_object.seek(0)
frames = duration = 0
while True:
try:
frames += 1
duration += PIL_Image_object.info['duration']
PIL_Image_object.seek(PIL_Image_object.tell() + 1)
except EOFError:
return frames / duration * 1000
return None
def main():
filePath = choose_file()
img_obj = Image.open(filePath)
print(f"Total frame time: {get_frame_time(img_obj)}")
print(f"File: {filePath.split('/')[-1]}")
if __name__ == '__main__':
main()