Profiling

The profile output doesn’t have that level of detail. (I guess the interpreter could generate it, but it currently doesn’t.) I usually just follow chunks of time around until I find a point of pain. If involved is showing a lot of total time, then some caller of involved is too.

If you’re doing “repeat through involved things” or “now all involved things…”, then yes, those could be sped up a lot by referring directly to noun and second noun.

I don’t mind that. It’s super useful!

The problem was a couple of accessibility rules, which make use of my Flexible Action Requirements extension:

Accessibility rule when a required to be touched thing is enclosed by an other person:

I modified Flexible Action Requirements to replace the adjective “required to be touched” with the phrase “(O - a description of objects) must be touched.” The phrase only tests the noun and the second noun. Bingo!

Accessibility rule: Let the possession be the thing enclosed by an other person that must be touched; if the possession is nothing, make no decision;

I’m writing a little utility so I can look at profiling results more easily, and one of the things I’m doing is filtering the function names. Some of them are obvious, like “Adj_…” and “Prop_…” and “…_R”, but what are these?

“A_…”
“B_…”
“R_…”
“T…”
“NAP_…”

etc.

They are functions for qualitative values. T* will print the corresponding value name. A_T* gives the next value, wrapping around if necessarily, while B_T* gives the previous. R_T* returns a random value.

But R_* functions are of course the rules themselves!

I’m learning lots of stuff about what makes Inform go (slightly) fast(er). Turns out that Scope Caching might not have been so great - I spend a lot of time re-caching scope. But I haven’t yet tried eliminating it to see if regular scope checking would take even longer. I suspect that it would, but I also suspect I could use a dumbed-down version of scope checking (e.g. “enclosed by the location”) without any loss of functionality.

“Involved” is just a bad adjective to use, at least in more open-ended descriptions. You essentially replace testing two things with testing every object in the game!