
App stats is a great tool for analyzing what is going wrong with the performance of one's app. On top of that, I also think it is a great learning tool. Thus, I started a "patterns of doom" site that can produce common snags and render their result in app stats. If you have anything that you believe happens to developers out there a lot and would like to add to the site, let me know.
Today's pattern is the "chain of gets": this little friend could also be called "death by a thousand cuts". It will perform a series of gets from the store, for example in a loop. Since each of these gets is an individual RPC, it will take additional time to perform. The pattern in app stats looks like a progression of small time slices; each of them very small, but the sum of them enormous. The better solution: fetch all those models in a single get.
You can check out the code that produced this sampe from the app stats details page. If you want to re-run it and look at a freshly generated graph, click here (please be gentle; this is running on free quota ;-). And again: if you know good examples you'd like to add to the site, please let me know.
1 comments:
This is such great advice! We managed to cut a big chain of gets immediately using your suggested cure. Thanks for sharing!
Post a Comment