Commit 2ec02674 authored by tonyg@chromium.org's avatar tonyg@chromium.org

[Telemetry] Make server startup faster and use less RAM.

This avoids reading in the large .svn directories on the bots.

BUG=None
TEST=intl1 cycler on windows
NOTRY=True


Review URL: https://chromiumcodereview.appspot.com/12767015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190508 0039d316-1c4b-4281-b951-d872f2087c98
parent 7c8ddd8b
...@@ -52,7 +52,11 @@ class MemoryCacheHTTPServer(SocketServer.ThreadingMixIn, ...@@ -52,7 +52,11 @@ class MemoryCacheHTTPServer(SocketServer.ThreadingMixIn,
def LoadResourceMap(self, cwd): def LoadResourceMap(self, cwd):
"""Loads all files in cwd into the in-memory resource map.""" """Loads all files in cwd into the in-memory resource map."""
for root, _, files in os.walk(cwd): for root, dirs, files in os.walk(cwd):
# Skip hidden files and folders (like .svn and .git).
files = [f for f in files if f[0] != '.']
dirs[:] = [d for d in dirs if d[0] != '.']
for f in files: for f in files:
file_path = os.path.join(root, f) file_path = os.path.join(root, f)
if not os.path.exists(file_path): # Allow for '.#' files if not os.path.exists(file_path): # Allow for '.#' files
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment