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

Unified Diff: tools/gritsettings/README.md

Issue 2696303003: Add a script to GRIT to generate predetermined resource ids file. (Closed)
Patch Set: Address comments. Created 3 years, 10 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 | « tools/grit/grit/format/gen_predetermined_ids_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gritsettings/README.md
diff --git a/tools/gritsettings/README.md b/tools/gritsettings/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..344fef0913f55b2f83397f580e7387c613a9a0fd
--- /dev/null
+++ b/tools/gritsettings/README.md
@@ -0,0 +1,36 @@
+### tools/gritsettings README
+
+This directory contains several files that apply global to the Chrome resource
+generation system (which uses GRIT - see tools/grit).
+
+**resource_ids**: This file is used to assign starting resource ids for
+resources and strings used by Chromium. This is done to ensure that resource ids
+are unique across all the grd files. If you are adding a new grd file, please
+add a new entry to this file.
+
+**translation_expectations.pyl**: Specifies which grd files should be translated
+and into which languages they should be translated. Used by the internal
+translation process.
+
+**startup_resources_[platform].txt**: These files provide a pre-determined
+resource id ordering that will be used by GRIT when assigning resources ids. The
+goal is to have the resource loaded during Chrome startup be ordered first in
+the .pak files, so that fewer page faults are suffered during Chrome start up.
+To update or generate one of these files, follow these instructions:
+
+ 1. Build a Chrome official release build and launch it with command line:
+ `--print-resource-ids` and save the output to a file (e.g. res.txt).
+
+ 2. Generate the startup_resources_[platform].txt via the following command
+ (you can redirect its output to the new file location):
+
+ `
+ tools/grit/grit/format/gen_predetermined_ids.py res_ids.txt out/gn
+ `
+
+ In the above command, res_ids.txt is the file produced in step 1 and out/gn
+ is you Chrome build directory where you compiled Chrome. The output of the
+ command can be added as a new startup_resource_[platform]
+
+ 3. If this is a new file, modify `tools/grit/grit_rule.gni` to set its path
+ via `grit_predetermined_resource_ids_file` for the given platform.
« no previous file with comments | « tools/grit/grit/format/gen_predetermined_ids_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698