I’ve suprisingly found, as many others, that blueprints middlewares are global https://github.com/huge-success/sanic/issues/37.
So I started digging into that specific problem.
I have several questions -
- Is there specific optimizations I should aware of? It looks like for middlewares is used list of functions (global) - is this for optimization? Is it OK to store Blueprints object and have local middlewares attached to it?
self._blueprint_order.append(blueprint)- it registers blueprint objects and never is used elsewhere. Am I missing something?