question

Lisa avatar image
Lisa asked

Where can I modify Event(load)?

I have a Fire TV app built with the Web App Starter Kit, and have noticed it's pretty slow to load initially. In Chrome DevTools, I recorded the performance and see it takes 292.90 ms to load (which triggers a performance warning from Chrome... see screenshots).

Usually Chrome points you to a js file that's in need of editing to help the performance, but here, it's just the loading Event. Are there any specific places in the WASK this would be pointing to? My thought was it could be the loadInitialData function in model-json.js (perhaps my API call to load the initial data on the home screen is flawed?), but was wondering if there is anywhere else I can check or anything else I can do to help speed up performance.

Thank you!

fire tvweb appsfire app builder
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jacek avatar image
Jacek answered

Model code is usually a good place to look first. Although, model also reflects the server behavior. Also, if the time spent is in jquery (as the first image would suggest), that would clearly indicate your server being slow. So, before modifying anything in the WASK code, try to duplicate all your server calls from any desktop browser.

Also, 300ms during the startup may not be that much to worry about, especially if you are hitting a test server that is far enough (as ping would indicate), plus slow to perform your requests.

Thank you, Jacek

1 comment
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

OK, thank you! This is helpful--I noticed the bit about jQuery too, after I posted.

0 Likes 0 ·