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

Issue 63203002: Docserver: Make the hand-written Cron methods run first rather than last, since (Closed)

Created:
7 years, 1 month ago by not at google - send to devlin
Modified:
7 years, 1 month ago
Reviewers:
Jeffrey Yasskin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Docserver: Make the hand-written Cron methods return a Future and run first rather than last, so that they can be parallelised and have the most effect. Implement a few of the more trivial Cron methods, including moving most FeaturesBundle methods to return Futures. BUG=305280 R=jyasskin@chromium.org NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=233427

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : logging #

Total comments: 4

Patch Set 4 : rebase #

Patch Set 5 : jeffrey #

Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -90 lines) Patch
M chrome/common/extensions/docs/server2/api_list_data_source.py View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/api_models.py View 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/app.yaml View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/content_provider.py View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/common/extensions/docs/server2/content_providers.py View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/common/extensions/docs/server2/cron.yaml View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/cron_servlet.py View 1 2 3 4 3 chunks +45 lines, -18 lines 0 comments Download
M chrome/common/extensions/docs/server2/cron_servlet_test.py View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/features_bundle.py View 3 chunks +28 lines, -13 lines 0 comments Download
M chrome/common/extensions/docs/server2/features_bundle_test.py View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/common/extensions/docs/server2/manifest_data_source.py View 2 chunks +19 lines, -16 lines 0 comments Download
M chrome/common/extensions/docs/server2/manifest_data_source_test.py View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/permissions_data_source.py View 1 2 chunks +24 lines, -22 lines 0 comments Download
M chrome/common/extensions/docs/server2/redirector.py View 2 chunks +5 lines, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/redirector_test.py View 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/sidenav_data_source.py View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/common/extensions/docs/server2/sidenav_data_source_test.py View 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/strings_data_source.py View 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/common/extensions/docs/server2/template_data_source.py View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
not at google - send to devlin
7 years, 1 month ago (2013-11-06 21:28:30 UTC) #1
Jeffrey Yasskin
lgtm https://codereview.chromium.org/63203002/diff/50001/chrome/common/extensions/docs/server2/cron_servlet.py File chrome/common/extensions/docs/server2/cron_servlet.py (right): https://codereview.chromium.org/63203002/diff/50001/chrome/common/extensions/docs/server2/cron_servlet.py#newcode171 chrome/common/extensions/docs/server2/cron_servlet.py:171: '%s: took %s seconds' % (title, time.time() - ...
7 years, 1 month ago (2013-11-06 22:37:09 UTC) #2
not at google - send to devlin
Committed patchset #5 manually as r233427.
7 years, 1 month ago (2013-11-07 00:14:47 UTC) #3
not at google - send to devlin
7 years, 1 month ago (2013-11-11 04:08:33 UTC) #4
Message was sent while issue was closed.
submitted this ages ago, sending comments.

https://codereview.chromium.org/63203002/diff/50001/chrome/common/extensions/...
File chrome/common/extensions/docs/server2/cron_servlet.py (right):

https://codereview.chromium.org/63203002/diff/50001/chrome/common/extensions/...
chrome/common/extensions/docs/server2/cron_servlet.py:171: '%s: took %s seconds'
% (title, time.time() - start_time))
On 2013/11/06 22:37:09, Jeffrey Yasskin wrote:
> This may not be so useful anymore since even if the work is completely
finished
> by the .Get() call, you'll still get the time of the .Get call rather than the
> time the action took. Maybe take a time for creating the future and a separate
> time for running .Get() and add them?

Makes sense.

This logging is most for me to check to make sure nothing crazy is going on, but
separating out the times would be useful.

https://codereview.chromium.org/63203002/diff/50001/chrome/common/extensions/...
chrome/common/extensions/docs/server2/cron_servlet.py:181: for future in
futures:
On 2013/11/06 22:37:09, Jeffrey Yasskin wrote:
> You could delay this loop until the end of the function, to give it more time
to
> overlap with rendering.

Good idea.

Powered by Google App Engine
This is Rietveld 408576698