Open atitan opened 6 years ago
Nice! Is there a maximum number of records where performance degrades?
Currently we have 300+ categories listing as a tree. It takes about 15~20 seconds to update for every single drag in the admin panel.
I was able to cut it down to 2 seconds with this patch.
Making the method of loading records configurable could work, but loading all records shouldn't be the default.
On Wed, Aug 29, 2018 at 22:32 Sh Lin notifications@github.com wrote:
Currently we have 300+ categories listing as a tree. It takes about 15~20 seconds to update for every single drag in the admin panel.
I was able to cut it down to 2 seconds with this patch.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zorab47/active_admin-sortable_tree/pull/77#issuecomment-417178706, or mute the thread https://github.com/notifications/unsubscribe-auth/AABiBjEYPdoGvh2cCfRUE4FS3IFAxiCmks5uV1y5gaJpZM4WFNIr .
The original creates a lot of N+1 queries when collection set is large.
Query everything in the first place and assign them.