Consider the following two scenarios:
In app.yaml
There are two URL handlers.
handlers: - url: /main script: main.app1 - url: /secondary script: secondary.app2
and URI router in main.py
app1 = webapp2.WSGIApplication([('/main', MainHandler)])
and the other in secondary.py
app2 = webapp2.WSGIApplication([('/secondary', SecondaryHandler)])
vs
There is one URL handler in app.yaml
handlers: - url: /.* script: main.app
and the URI handles the router
app = webapp2.WSGIApplication([ ('/main', MainHandler), ('/secondary', SecondaryHandler) ])
Is there a difference in how App Engine imports two scripts? If all the queries are for MainHandler, does the App Engine allow importing files related to SecondaryHandler in the first script or when the instance always imports each handler the first time it is initialized?
Obviously, these are different ways to split the application logically, but I ask if there are any performance considerations related to this.
source share