Hm, interesting question! I believe the inventory function iterates over the actors contents, so only what the player is holding.
I implemented the categories myself using listers, which I’m sure has added some lag as opposed to the default inventory function, which is uncategorized. I implemented them because my inventory was becoming cluttered (as per my post here). You make a good point though, as I’m unsure exactly how my lister iterates over the inventory.
There are 17 individual objects or snails, but I am toying with the idea of a representative object, like the coin purse, if it can optimize the gameplay.