vortec / libtree

Python Tree Library
MIT License
78 stars 3 forks source link

Improve update_ancestors_after_delete trigger #5

Closed jameshy closed 9 years ago

jameshy commented 9 years ago

Previous benchmark results:

delete_node_worst_case        4.00s
delete_node_best_case         1.32s

New benchmark results:

delete_node_worst_case        1.98s
delete_node_best_case         317.17ms

Postgresql 9.4.5 with default settings on OSX.

vortec commented 9 years ago

Thank you, that's a nice speed-up! I get similar results, before:

delete_node_worst_case        5.16s
delete_node_best_case         1.45s

After:

delete_node_worst_case        3.97s
delete_node_best_case         327.91ms