You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[#70] Fix analyze CRC for cah:/ resources; add independent --skip-crc
Recognize content-addressed stream paths (cah:/<hash>) produced by Unity
6.6 ContentDirectory builds: fold the path (which contains the content
hash) into the CRC instead of opening the differently named resource
file, which was failing with "Error opening resource file". Legacy
CAB-*.resS/.resource streams still read their bytes for the CRC.
Also addresses the performance issues from PR 66 without losing CRC
coverage of external streams:
- Fix UnityFileReader.ComputeCRC chunking (advance the file offset and
handle the partial final chunk) so ranges larger than the buffer no
longer produce a wrong CRC or over-read.
- Fix the ProcessManagedReferenceData CRC size argument (stringSize + 4,
not m_Offset + stringSize + 4).
- Keep journal_mode = MEMORY (drop PR 66's ineffective WAL change).
Add a --skip-crc option, fully independent of --skip-references:
--skip-references now only skips reference extraction and no longer
skips the CRC. The reference walk still resolves referenced object ids
(so the CRC stays stable) but only inserts refs rows when extracting.
Add a ComputeCRC unit test for buffer-boundary ranges and update the
analyze documentation for the new flag semantics.
Fixes#70.
See also [Analyze Examples](../../Documentation/analyze-examples.md).
@@ -121,23 +122,27 @@ See [Comparing Builds](../../Documentation/comparing-builds.md) for strategies t
121
122
122
123
### Slow Analyze times, large output database
123
124
124
-
Consider using the `--skip-references` argument.
125
+
Two independent flags reduce analyze time and database size:
125
126
126
-
A real life analyze of a big Addressables build shows how large a difference this can make:
127
+
*`--skip-crc` skips the CRC32 calculation. This is usually the largest time saver, because computing a CRC requires reading the full content of every object, including large texture, mesh and audio data in companion `.resS`/`.resource` files.
128
+
*`--skip-references` skips reference extraction, which is the largest contributor to database size (the `refs` table). The references are not needed for core asset inventory and size information.
127
129
128
-
* 208 seconds and producted a 500MB database (not specifying --skip-reference)
129
-
* 9 seconds and produced a 68 MB file (with --skip-reference)
130
+
For the fastest, smallest result, combine them.
130
131
131
-
The references are not needed for core asset inventory and size information.
132
+
A real life analyze of a big Addressables build, skipping both references and CRC, shows how large a difference this can make:
132
133
133
-
Note: When specifying `--skip-reference` some functionality is lost:
134
+
* 208 seconds and produced a 500MB database (default)
135
+
* 9 seconds and produced a 68 MB file (with `--skip-references --skip-crc`)
136
+
137
+
When `--skip-references` is used, some functionality is lost:
134
138
135
139
* the `find-refs` command will not work
136
140
*`view_material_shader_refs` and `view_material_texture_refs` will be empty
141
+
*`script_object_view` will be empty
137
142
* Queries that look at the relationship between objects will not work. For example the refs table is required to link between a `MonoBehaviour` and its `MonoScript`.
138
-
* The `objects.crc32` column will be NULL/0 for all objects. This means:
139
-
* No detection of identical objects by content hash (See [Comparing Builds](../../Documentation/comparing-builds.md))
140
-
* The `view_potential_duplicates` view relies partially on CRC32 to distinguish true duplicates
141
143
142
-
Future work: The refs table contains a lot of repeated strings and could be made smaller and more efficient. It might also be prudent to control the CRC32 calculation using an independent flag.
144
+
When `--skip-crc` is used, the `objects.crc32` column will be 0 for all objects. This means:
145
+
146
+
* No detection of identical objects by content hash (See [Comparing Builds](../../Documentation/comparing-builds.md))
147
+
* The `view_potential_duplicates` view relies partially on CRC32 to distinguish true duplicates
0 commit comments