- summary memories command documentation
Print memory usage for partial matches.
|| `-c, --chunks` || Print memory usage of chunks. || || `-d, --default` || Print memory usage of default productions. || || `-j, --justifications` || Print memory usage of justifications. || || `-u, --user` || Print memory usage of user-defined productions. || || `production_name` || Print memory usage for a specific production. || || `number` || Number of productions to print, sorted by those that use the most memory. || || `-T, --template` || Print memory usage of Soar-RL templates. ||
The memories command prints out the internal memory usage for full and partial matches of production instantiations, with the productions using the most memory printed first. With no arguments, the memories command prints memory usage for all productions. If a `production_name` is specified, memory usage will be printed only for that production. If a positive integer `number` is given, only `number` productions will be printed: the `number` productions that use the most memory. Output may be restricted to print memory usage for particular types of productions using the command options.
Memory usage is recorded according to the tokens that are allocated in the rete network for the given production(s). This number is a function of the number of elements in working memory that match each production. Therefore, this command will not provide useful information at the beginning of a Soar run (when working memory is empty) and should be called in the middle (or at the end) of a Soar run.
The memories command is used to find the productions that are using the most memory and, therefore, may be taking the longest time to match (this is only a heuristic). By identifying these productions, you may be able to rewrite your program so that it will run more quickly. Note that memory usage is just a heuristic measure of the match time: A production might not use much memory relative to others but may still be time-consuming to match, and excising a production that uses a large number of tokens may not speed up your program, because the Rete matcher shares common structure among different productions.
As a rule of thumb, numbers less than 100 mean that the production is using a small amount of memory, numbers above 1000 mean that the production is using a large amount of memory, and numbers above 10,000 mean that the production is using a *very* large amount of memory.
[cmd_matches]