Black Lives Matter. Please consider donating to Black Girls Code today.

Google App Engine #slow #cache #performance #staticFiles

Hello,

When I play with my app locally everything is fine and “fast” but once deployed to Google App Engine it becomes so slow it is unusable even with the highest resources instance.

I noticed that the app is constantly requiring some JS file:

"GET /sensors/assets/style.css?m=1575646244.0 HTTP/1.1" 304
"GET /sensors/_dash-component-suites/dash_renderer/react-dom@16.8.6.min.js?v=1.1.1&m=1575632433 HTTP/1.1" 200
"GET /sensors/_dash-component-suites/dash_renderer/react@16.8.6.min.js?v=1.1.1&m=1575632433 HTTP/1.1" 200
"GET /sensors/_dash-component-suites/dash_core_components/plotly-1.50.0.min.js?v=1.3.0&m=1575632438 HTTP/1.1" 200
"GET /sensors/_dash-component-suites/dash_renderer/prop-types@15.7.2.min.js?v=1.1.1&m=1575632433 HTTP/1.1" 200
"GET /sensors/_dash-component-suites/dash_html_components/dash_html_components.min.js?v=1.0.1&m=1575632444 HTTP/1.1" 200
"GET /sensors/_dash-component-suites/dash_core_components/highlight.pack.js?v=1.3.0&m=1575632438 HTTP/1.1" 200
"GET /sensors/_dash-component-suites/dash_core_components/dash_core_components.min.js?v=1.3.0&m=1575632438 HTTP/1.1" 200
"GET /sensors/_dash-component-suites/dash_renderer/dash_renderer.min.js?v=1.1.1&m=1575632433 HTTP/1.1" 200

And if each of them takes in average 30ms locally it’s more like 400ms in GCP.
Is it possible to cache the file or the querystring parameters v and m make it totally different?
Would be nice to see some more 304 there :slight_smile:

Thanks

We fixed caching recently in 1.5.0 (📣 Dash 1.5.0 released), could you try upgrading?

1 Like

Awesome thanks that is way much better now
With a bit of App Engine “warmup” hook to prepare resources in advance and everything is smooth
:clap: SOLVED