diff --git a/maxdiff/README.md b/maxdiff/README.md index bc29183..c152b26 100644 --- a/maxdiff/README.md +++ b/maxdiff/README.md @@ -18,12 +18,30 @@ Removing the comments from the new MIDI Effect: For `.amxd` files: * The scripts will also tell you what device type it is. -* If a device is frozen, you will see an overview of the content frozen into the deivce. NOTE: We recommend never to commit frozen devices to a git repo, instead to include the dependencies as separate files. +* If a device is frozen, you will see an overview and statistics of the content frozen into the device. NOTE: We recommend never to commit frozen devices to a git repo, instead to include the dependencies as separate files. ### Why? Readable diffs are very useful for patch code review, or for a sanity check before committing (did I really change nothing else expect removing all my debug messages and prints?). +### Using the frozen device statistics + +It currently supports two different ways to count object instances and connections: + +* Total - Counting every abstraction instance - Indicates loading time +* Unique - Counting abstractions once - Indicates maintainability + +This provides the ability to quantify refactoring efforts. Of course there is more to refactoring than these statistics, but this does make refactoring work more tangible. + +Note that we typically don't commit frozen devices to a repo, so the typical way to use this feature is: + +1. Commit the device and its dependencies in **un**frozen state. +2. Temporarily freeze the device. +3. Run `python3 ./maxdiff/amxd_textconv.py ` to get the statistics. +4. Discard the freezing. + +Note: the reason this only works with frozen devices is that these unambiguously capture all dependencies. + ### What does not work Typical things you can do with text-based code that will not work with Max patches or devices: