We create in one call all the records of the same tree level and we update all
the record in one call.
Side effect, as there is no more recursion, the depth of the chart can be
higher than the maximum depth of the Python interpreter stack.
issue5400
review23991002