I have a model involving nested set data structure, so I have used act_as_nested_set gem. Now, I have a requirement of bulk inserting more 100 thousand records. If it was not nested set data structure, bulk insertion could have been easier and swift. But with Nested set each insertion update all the records in the ancestor chain. So, this takes too long.
I thought of creating in-memory tree and maintaining the lft, rgt, depth, children_count, depth and then mass inserting them, but I am not certain if it would be good idea to create 100 thousands complex object in-memory.