Rather than use pylons.c and "magical_c" we should just make our own allura.c environ proxy and make our lives easier, and remove the word "magical" from our variable names ;)
I'm actually thinking we should use a 'streaming' registry manager and eliminate the magicalC -- streaming registry managers don't clean up their stacked object proxies (SOPs) until the iterator is exhausted, which is the behavior we want. TG by default uses a non-streaming registry manager, so the various SOPs are cleaned up when we return from the controller, before the template is rendered, which is a Bad Thing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Interesting, I didn't know that was a feature of paste SOP's. I'm not opposed to changing it, because I doubt many people are using SOP's in a way where it would make a difference.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A bunch of global-ish variables were switched to SOPs, our middleware was reordered, and we are now using the streaming registry to make sure our SOPs don't get cleaned up before the iterator is exhausted.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm actually thinking we should use a 'streaming' registry manager and eliminate the magicalC -- streaming registry managers don't clean up their stacked object proxies (SOPs) until the iterator is exhausted, which is the behavior we want. TG by default uses a non-streaming registry manager, so the various SOPs are cleaned up when we return from the controller, before the template is rendered, which is a Bad Thing.
Interesting, I didn't know that was a feature of paste SOP's. I'm not opposed to changing it, because I doubt many people are using SOP's in a way where it would make a difference.
A bunch of global-ish variables were switched to SOPs, our middleware was reordered, and we are now using the streaming registry to make sure our SOPs don't get cleaned up before the iterator is exhausted.