-Eric
Disclaimer: technical discussion ahead.
The optimization efforts did two things:
- I reduced the overall number of calls to the GAE datastore. In the code, I noticed several places where I was making redundant data calls. I consolidated them into a single call for each page view. (This should drastically reduce the load on the datastore).
- I enabled memcache. So, if you view your page without editing it, the results will be cached (and not fetched from the datastore). As soon as you edit your page, the cache is cleared. No stale data here! Introducing memcahce further reduces the load on the datastore, as it caches your page.
EDIT - further optimization:
I implemented further optimizations which solved the root of the issue. Turns out I was blowing the quota for small datastore operations. These operations were being generated by calls to count() all over the code. I was able to work around all of these except those on the /stats page. I had to remove the stats about how many users and pages Linkpad has, as these stats were causing the application to go over it's quota.
Linkpad is now back to being a cost-free operation.
No comments:
Post a Comment