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

Unified Diff: tools/telemetry/telemetry/core/memory_cache_http_server.py

Issue 12767015: [Telemetry] Make server startup faster and use less RAM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dtu comments Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/memory_cache_http_server.py
diff --git a/tools/telemetry/telemetry/core/memory_cache_http_server.py b/tools/telemetry/telemetry/core/memory_cache_http_server.py
index ad6d344a422071d94697ec72610920d8839d9bc7..4efb749a1213bcac17e0a21bce1513eaf56e9613 100644
--- a/tools/telemetry/telemetry/core/memory_cache_http_server.py
+++ b/tools/telemetry/telemetry/core/memory_cache_http_server.py
@@ -52,7 +52,11 @@ class MemoryCacheHTTPServer(SocketServer.ThreadingMixIn,
def LoadResourceMap(self, cwd):
"""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:
file_path = os.path.join(root, f)
if not os.path.exists(file_path): # Allow for '.#' files
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698