644ba5d4bc
A node object has many fields, and a huge opportunity for performance improvement is to reduce the amount of work performed at the lower layers when it is not necessary. In particular, the easiest case to identify and handle is when a list of fields to be fulfilled is explicitly supplied. This is particularlly noteworthy when we collecting a list of nodes for synconization with Nova, where only 9 columns are really needed to supply Nova with the information required, and thus numerous fields are discarded. This is all particularlly compounded when traits are used, which presently uses a joined load pattern from SQL. With this patch, we explicitly load and convert only the fields requested at the lowest level, and then perform a different style of loading node traits which requires less overhead by SQLAlchemy to de-duplicate the returned result set to the application. This turns out to be far more efficent as we're reducing the amount of data/object conversion work by 360%, even before we consider populating traits, which is performed as a separate query when traits are requested. Story: 2008885 Task: 42434 Change-Id: Iac703d2a9b7b240a47477be8a64c7c33e28f692f |
||
---|---|---|
.. | ||
sqlalchemy | ||
__init__.py | ||
api.py | ||
migration.py |