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

Unified Diff: grit/format/data_pack.py

Issue 244893005: Speed-up whitelist check in data_pack.py (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: Created 6 years, 8 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: grit/format/data_pack.py
diff --git a/grit/format/data_pack.py b/grit/format/data_pack.py
index 779a8624517ec054a15213d220938e7475f6444e..0d2f89d47aec72bf9343b55716e15b995ac07559 100755
--- a/grit/format/data_pack.py
+++ b/grit/format/data_pack.py
@@ -127,7 +127,7 @@ def RePack(output_file, input_files, whitelist_file=None):
whitelist = None
if whitelist_file:
whitelist = util.ReadFile(whitelist_file, util.RAW_TEXT).strip().split('\n')
- whitelist = map(int, whitelist)
+ whitelist = set(map(int, whitelist))
resources, encoding = RePackFromDataPackStrings(input_data_packs, whitelist)
WriteDataPack(resources, output_file, encoding)
« 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