I don't want to go down a rabbit hole just yet, so I'm just going to ask.
I got one of these things: A IContextSourceBinder Vocabularies β Plone Documentation v5.2
And, as far as I know, it's all simply wired up. The only thing a bit different is the field that uses the vocabulary is in a behavior.
Is there any reason why an anonymous view of an object would call the vocabulary constructor?
Maybe we have some stray code that manually calls the vocabulary, I haven't looked for it yet.
All I know at this point is that my vocabulary function - used for one field, (in a behavior, btw) is being called 3 times each page view, and it's slightly annoying.
Wait - I think I know what I did wrong... now that I wrote this out... but still asking this basic question.
I have some weird ajaxy calls to grab json views of the vocabulary to make a fancy edit page. I think this javascript may be getting included and run on view templates also... That's the likely culprit.
Nope, that ajaxy javascript isn't included on the view, only on the edit (formgen-ed) pages. So this doesn't explain why the vocabulary builder is called on view.
"Well me, it's nice talking to myself
A credit to dementia"