There are a couple of serious performance issues with amp-story:
There is nothing 'accelerated' about these issues.
I am hoping that amp-story exposes some api for these, but somehow I have missed them in the documentations.
Hi @jimbojetlag, we're continuing to work on the performance of amp-story, and appreciate your feedback!
For (1), we do have lazy loading for images and videos, so if it's not working, that's a bug. We do load more than just the amp-story-page that's within the viewport (to increase the chances that the content is loaded at the time that you advance), but we don't load the assets from the entire story. It's always a balance, and hopefully we can use #15103 to optimize this balance further, based on what we know about the user's device and network capabilities.
For (2), may I ask what browser you're using on desktop? Particularly, we've noticed poor performance with the blurred background on Firefox due to https://bugzilla.mozilla.org/show_bug.cgi?id=1474985. It's also likely made worse by particularly high-resolution assets.
Thank you @newmuis for your response.
For (1), I experienced poor performance when having some mp4 pages mixed in among the images. So even a quick glance of a few pages is enough to put many mp4 pages in the viewport and trigger parallel streamings. Downloading should also stop when the pages go out of the viewport. I do not believe there is an HTML API for that, so you may want to remove the dom responsible for streaming content out of viewport, and then put it back.
For (2), I tested in Chrome 69 on Mac. The performance is specially poor when switching to integrated GPU on MBP. Generally, blur filters are expensive. At the very least you may want to expose a background option.
Thanks for the details. For (1), this is actually what we already do. We can be more aggressive in deallocation, though. I will file an issue to track more aggressively aborting and deallocating videos that the user has passed.
For (2), we have been having conversations about the expensiveness of blur in general, and are thinking through some alternatives. /cc @hongwei1990 @gmajoulet
(1) After internal discussions, we filed #17941, thanks for looking into this!
(2) Like Jon said, we're looking into other desktop layouts that wouldn't need to use blur filters (#16465). But we're also looking into ways to keep the blur without hurting performance (#15146).
@jimbojetlag, since there are issues filed for each of the actionable points you've brought up, we'll use those to track. I will close this issue since there are no other untracked issues or questions stated here.
Please feel free to reopen or file new issues as needed. Thanks again for the feedback!