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

Issue 489693002: [telemetry] Move stale .pyc check from Python import to gclient hook. (Closed)

Created:
6 years, 4 months ago by dtu
Modified:
6 years, 3 months ago
Reviewers:
Dirk Pranke, tonyg
CC:
chromium-reviews, telemetry+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[telemetry] Move stale .pyc check from Python import to gclient hook. This check turns out to be fairly expensive on Windows (~150ms), and having it at import time means we're taking the hit every time we launch memory_cache_http_server. We only need to do this if the Python files have changed, so move it to runhooks. The reason this check exists in the first place is that we've had problems in the past where e.g. someone renames foo.py to foo/__init__.py. foo.pyc remains on the filesystem of every Chromium checkout and causes a name conflict in Python imports - foo can refer to the compiled module or the package. BUG=388256 TEST=git rm a file in src/tools that has a .pyc; git commit; gclient runhooks; ensure .pyc doesn't exist; undo commit Committed: https://crrev.com/94f4bd9c8bf1ab611a41b290e8feb1d48fdb1f21 Cr-Commit-Position: refs/heads/master@{#291825}

Patch Set 1 #

Patch Set 2 : Move to tools/ #

Total comments: 1

Patch Set 3 : .* #

Patch Set 4 : Rebase! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -31 lines) Patch
M DEPS View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
A tools/remove_stale_pyc_files.py View 1 1 chunk +39 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/util/global_hooks.py View 1 chunk +0 lines, -31 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
dtu
Dirk, do you know how to test something like this? In particular, I'm not sure ...
6 years, 4 months ago (2014-08-20 00:54:49 UTC) #1
Dirk Pranke
I think you can probably test this by moving or deleting a file locally and ...
6 years, 4 months ago (2014-08-20 01:02:23 UTC) #2
dtu
Patchset #4 (id:60001) has been deleted
6 years, 4 months ago (2014-08-25 23:57:53 UTC) #3
dtu
The CQ bit was checked by dtu@chromium.org
6 years, 4 months ago (2014-08-25 23:58:30 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dtu@chromium.org/489693002/80001
6 years, 4 months ago (2014-08-26 00:01:46 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-26 00:01:47 UTC) #6
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
6 years, 4 months ago (2014-08-26 00:01:48 UTC) #7
tonyg
lgtm
6 years, 4 months ago (2014-08-26 00:03:25 UTC) #8
dtu
The CQ bit was checked by dtu@chromium.org
6 years, 4 months ago (2014-08-26 00:06:33 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dtu@chromium.org/489693002/80001
6 years, 4 months ago (2014-08-26 00:09:31 UTC) #10
commit-bot: I haz the power
Committed patchset #4 (80001) as 12fdb8797b334a744a5cc4cc0f6f40f2c84c7a1f
6 years, 4 months ago (2014-08-26 03:02:23 UTC) #11
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 02:39:52 UTC) #12
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/94f4bd9c8bf1ab611a41b290e8feb1d48fdb1f21
Cr-Commit-Position: refs/heads/master@{#291825}

Powered by Google App Engine
This is Rietveld 408576698