Werk #18032 · May 14, 25
HW/SW Inventory: Speed up loading trees
So far the inventory trees are saved with Python's repr function and loaded with
ast.literal_eval. Now new or archived trees are saved as json.
A distributed setup may be constituted of sites where remote sites use already this version and
the central site still uses a 2.4.0 version. In order to make the repr vs. json inventory
tree transformation work the central site must be at least of version 2.4.0p3. See also werk 18034.
A simple test shows a clear performance improvement. Loading 150 trees, each of size 1.7 MB, takes
-
65 seconds with
ast.literal_eval -
2 seconds with
json.loads
Details
- Class:
- New Features
- Level:
- Prominent
- Component:
- Inventory
- Versions:
- 2.5.0b1All Editions