F
Filament2mo ago
Haydra

bulk actions with large dataset

when doing bulk action on 100k records, the app is freezed the action is attach many to many relation to selected records any idea how to solve it ? Thx in advance
5 Replies
Matthew
Matthew2mo ago
Are you sure it is frozen, and not just thinking? You could load the records into an unrelated staging table, then go through in batches to do the more complicated attach process. That way you could have a progress bar or some other visual clue it is still processing.
Haydra
HaydraOP2mo ago
That's a good idea, how to implement such thing? No it freeze, i read it may be caused by the memory
Haydra
HaydraOP2mo ago
@Matthew it just show this https://prnt.sc/rvDN8zk1H_5P
Lightshot
Screenshot
Captured with Lightshot
Matthew
Matthew2mo ago
how many records can you import without it breaking? Maybe easier to limit to that. To implement a staging table, you'll have to create a new model to import the records, then use a renderhook to call a handler to deal with the information sitting there. Dependent on your use case, it will probably be easier to limit the import numbers. If you are regularly grabbing 100k in records and importing them, it feels like a different solution is required.
Haydra
HaydraOP2mo ago
it's not an import, let's say it's bulk attaching (many-to-many) action
Want results from more Discord servers?
Add your server