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

Unified Diff: Source/build/scripts/make_css_property_names.py

Issue 196413006: [MemUsage][BinarySize] More perfect hashes for CSS strings. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | Source/build/scripts/make_css_value_keywords.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/make_css_property_names.py
diff --git a/Source/build/scripts/make_css_property_names.py b/Source/build/scripts/make_css_property_names.py
index c31a855b307a8ee991709599a4b2b30f756eedc8..f0a3a7f7ff474a7362e1db956527a3215099813a 100755
--- a/Source/build/scripts/make_css_property_names.py
+++ b/Source/build/scripts/make_css_property_names.py
@@ -97,9 +97,9 @@ struct Property;
%%compare-strncmp
%%define class-name %(class_name)sHash
%%define lookup-function-name findPropertyImpl
-%%define hash-function-name propery_hash_function
+%%define hash-function-name property_hash_function
%%define slot-name nameOffset
-%%define word-array-name property_wordlist
+%%define word-array-name property_word_list
%%enum
%%%%
%(property_to_enum_map)s
@@ -245,7 +245,9 @@ class CSSPropertiesWriter(in_generator.Writer):
'internal_properties': '\n'.join(map(self._case_properties, filter(lambda property: property['is_internal'], self._properties))),
}
# FIXME: If we could depend on Python 2.7, we would use subprocess.check_output
- gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-D', '-n', '-s', '2']
+ gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n']
+ gperf_args.extend(['-m', '50']) # Pick best of 50 attempts.
+ gperf_args.append('-D') # Allow duplicate hashes -> More compact code.
gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True)
return gperf.communicate(gperf_input)[0]
« no previous file with comments | « no previous file | Source/build/scripts/make_css_value_keywords.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698