Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Issue 10829348: Extensions Docs Server: Large performance increase (Closed)

Created:
8 years, 4 months ago by cduvall
Modified:
8 years, 4 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org, clintstaley
Visibility:
Public.

Description

Extensions Docs Server: Large performance increase Based off: https://chromiumcodereview.appspot.com/10834329 This adds a few things to speed up performance: 1. Caches items in memcache from FileSystemCache. 2. Caches everything primarily in memory, and falls back on memcache. 3. 5 minute timeout on stats. 4. Cron job to update memcache every 5 minutes (just enough time to update expired stats). 5. Memcache uses set_multi_async and get_multi_async where applicable. I have an instance at chrome-docs-test.appspot.com, but the cron job is only running every 10 minutes so I don't go over quota. After the cron job is run, even samples.html is fast! Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=152472

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : server is fast #

Total comments: 49

Patch Set 4 : fixes and ObjectStore #

Total comments: 22

Patch Set 5 : fix up ObjectStore #

Total comments: 6

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+660 lines, -384 lines) Patch
M chrome/common/extensions/docs/server2/api_data_source.py View 1 2 3 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/common/extensions/docs/server2/api_data_source_test.py View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/common/extensions/docs/server2/api_list_data_source.py View 1 2 3 3 chunks +48 lines, -37 lines 0 comments Download
M chrome/common/extensions/docs/server2/app.yaml View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/common/extensions/docs/server2/appengine_memcache.py View 1 2 3 1 chunk +0 lines, -30 lines 0 comments Download
M chrome/common/extensions/docs/server2/appengine_url_fetcher.py View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/appengine_wrappers.py View 1 2 3 3 chunks +22 lines, -26 lines 0 comments Download
M chrome/common/extensions/docs/server2/branch_utility.py View 1 2 3 4 3 chunks +10 lines, -9 lines 0 comments Download
M chrome/common/extensions/docs/server2/branch_utility_test.py View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
A chrome/common/extensions/docs/server2/cron.yaml View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/server2/example_zipper.py View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/file_system.py View 1 2 3 3 chunks +8 lines, -6 lines 0 comments Download
M chrome/common/extensions/docs/server2/file_system_cache.py View 1 2 3 4 5 3 chunks +58 lines, -29 lines 0 comments Download
M chrome/common/extensions/docs/server2/github_file_system.py View 1 2 3 3 chunks +9 lines, -9 lines 0 comments Download
M chrome/common/extensions/docs/server2/github_file_system_test.py View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/common/extensions/docs/server2/handler.py View 1 2 3 6 chunks +75 lines, -46 lines 0 comments Download
A chrome/common/extensions/docs/server2/in_memory_object_store.py View 1 2 3 4 5 1 chunk +91 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/server2/integration_test.py View 1 2 3 2 chunks +0 lines, -12 lines 0 comments Download
M chrome/common/extensions/docs/server2/intro_data_source.py View 1 2 3 4 2 chunks +25 lines, -14 lines 0 comments Download
M chrome/common/extensions/docs/server2/local_file_system.py View 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/memcache_file_system.py View 1 2 3 4 2 chunks +72 lines, -37 lines 0 comments Download
M chrome/common/extensions/docs/server2/memcache_file_system_test.py View 1 2 3 4 chunks +36 lines, -29 lines 0 comments Download
A chrome/common/extensions/docs/server2/memcache_object_store.py View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/server2/object_store.py View 1 2 3 4 1 chunk +56 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/server2/samples_data_source.py View 1 2 3 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/common/extensions/docs/server2/server_instance.py View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/subversion_file_system.py View 1 2 3 chunks +31 lines, -33 lines 0 comments Download
M chrome/common/extensions/docs/server2/template_data_source.py View 1 2 3 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/common/extensions/docs/server2/template_data_source_test.py View 1 2 3 6 chunks +20 lines, -19 lines 0 comments Download
M tools/json_schema_compiler/model.py View 1 2 3 1 chunk +24 lines, -22 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
cduvall
Fast server yay! I think it's ready for review.
8 years, 4 months ago (2012-08-18 00:48:37 UTC) #1
not at google - send to devlin
exciting! http://codereview.chromium.org/10829348/diff/1020/chrome/common/extensions/docs/server2/app.yaml File chrome/common/extensions/docs/server2/app.yaml (right): http://codereview.chromium.org/10829348/diff/1020/chrome/common/extensions/docs/server2/app.yaml#newcode1 chrome/common/extensions/docs/server2/app.yaml:1: application: chrome-docs-test :P http://codereview.chromium.org/10829348/diff/1020/chrome/common/extensions/docs/server2/appengine_memcache.py File chrome/common/extensions/docs/server2/appengine_memcache.py (right): http://codereview.chromium.org/10829348/diff/1020/chrome/common/extensions/docs/server2/appengine_memcache.py#newcode29 ...
8 years, 4 months ago (2012-08-20 05:27:10 UTC) #2
not at google - send to devlin
btw, do as much of the ObjectStore rename as you want in a follow-up (i.e. ...
8 years, 4 months ago (2012-08-20 05:36:52 UTC) #3
cduvall
ObjectStore :) https://chromiumcodereview.appspot.com/10829348/diff/1020/chrome/common/extensions/docs/server2/appengine_memcache.py File chrome/common/extensions/docs/server2/appengine_memcache.py (right): https://chromiumcodereview.appspot.com/10829348/diff/1020/chrome/common/extensions/docs/server2/appengine_memcache.py#newcode29 chrome/common/extensions/docs/server2/appengine_memcache.py:29: def __init__(self, cache, time, namespace, rpc=None, mapping=None): ...
8 years, 4 months ago (2012-08-20 21:28:09 UTC) #4
not at google - send to devlin
The cron job needs a test too, by the way. We should find out before ...
8 years, 4 months ago (2012-08-21 00:30:11 UTC) #5
cduvall
https://chromiumcodereview.appspot.com/10829348/diff/1020/chrome/common/extensions/docs/server2/handler.py File chrome/common/extensions/docs/server2/handler.py (right): https://chromiumcodereview.appspot.com/10829348/diff/1020/chrome/common/extensions/docs/server2/handler.py#newcode185 chrome/common/extensions/docs/server2/handler.py:185: render_cache.GetFromFileListing(PUBLIC_TEMPLATE_PATH) On 2012/08/21 00:30:11, kalman wrote: > On 2012/08/20 ...
8 years, 4 months ago (2012-08-21 01:33:33 UTC) #6
not at google - send to devlin
lgtm http://codereview.chromium.org/10829348/diff/5050/chrome/common/extensions/docs/server2/file_system_cache.py File chrome/common/extensions/docs/server2/file_system_cache.py (right): http://codereview.chromium.org/10829348/diff/5050/chrome/common/extensions/docs/server2/file_system_cache.py#newcode92 chrome/common/extensions/docs/server2/file_system_cache.py:92: if version == cache_entry.version: (cache_entry is not None) ...
8 years, 4 months ago (2012-08-21 01:43:22 UTC) #7
cduvall
8 years, 4 months ago (2012-08-21 01:50:10 UTC) #8
https://chromiumcodereview.appspot.com/10829348/diff/5050/chrome/common/exten...
File chrome/common/extensions/docs/server2/file_system_cache.py (right):

https://chromiumcodereview.appspot.com/10829348/diff/5050/chrome/common/exten...
chrome/common/extensions/docs/server2/file_system_cache.py:92: if version ==
cache_entry.version:
On 2012/08/21 01:43:22, kalman wrote:
> (cache_entry is not None) and (version == cache_entry.version)

Done.

https://chromiumcodereview.appspot.com/10829348/diff/5050/chrome/common/exten...
File chrome/common/extensions/docs/server2/in_memory_object_store.py (right):

https://chromiumcodereview.appspot.com/10829348/diff/5050/chrome/common/exten...
chrome/common/extensions/docs/server2/in_memory_object_store.py:53: def
_SetInMemory(self, key, value, namespace, time):
On 2012/08/21 01:43:22, kalman wrote:
> it's only used in 1 place (SetMulti) so i'd just inline it there.

Done.

https://chromiumcodereview.appspot.com/10829348/diff/5050/chrome/common/exten...
chrome/common/extensions/docs/server2/in_memory_object_store.py:58: def
_TryBackingObjectStore(self, key, namespace, time):
On 2012/08/21 01:43:22, kalman wrote:
> not called anymore, so you can delete it?

Done.

Powered by Google App Engine
This is Rietveld 408576698