Store.flush() includes a loop that is O(# alive objects)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
Fix Released
|
High
|
Thomas Herve |
Bug Description
In general, the cost of Store.flush() should be proportional to the number of dirty objects. However there is a loop at the start that is proportional to the number of alive objects:
for obj_info in self._iter_alive():
As the number of referenced objects grows, the cost of flush() increases irrespective of how many are dirty.
The flush event is only needed for objects that have column properties with mutable values like List() or Pickle() (in contrast to immutable values like strings and integers). If no such objects are in use, then the loop and events serve no purpose.
The cost of the flush events should only be incurred if objects that require it are used.
Related branches
- Gustavo Niemeyer: Approve
- Jamu Kakar (community): Approve
Changed in storm: | |
importance: | Undecided → High |
Changed in storm: | |
status: | Fix Committed → Fix Released |
Thomas's branch merged as r269 fixes this problem.