O
O
ordinary_pavel2017-06-01 14:01:53
Yii
ordinary_pavel, 2017-06-01 14:01:53

How to implement child sorting in nested sets from creocoder(yii2)?

Good day to all. I use nested sets from creocoder to store the tree. The task was to sort the descendants within the same level - but my implementation using the standard method what-> insertAfter (where) works unimaginably long (more than 5 minutes for ~ 2000 descendants of the same level). How to overcome this slowness?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-06-01
@webinar

Well, look at the debug panel, there is data there that specifically works there for a long time.
And how is insertAfter and sort related? Inserting an element into a tree and sorting the tree. Where is the logic?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question