Slow BulkExport Action

9914 records selected Exporting selected records using exporter from bulkActions is slow. while exporting those records using header's exporter is fast. slow : The actual export is fast but the time it takes for bulk exporter to show the export modal is like 30s and the export action is glued to the screen and moves with scroll like it's absolute. Am I doing something wrong here ?
->headerActions([
ExportAction::make()
->exporter(OrderExporter::class)
->modifyQueryUsing(function (Builder $query) {
return $query
->withoutGlobalScopes()
->where('organization_id', auth()->user()->organization_id);
}),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
ExportBulkAction::make()
->exporter(OrderExporter::class)
->modifyQueryUsing(function (Builder $query) {
return $query
->withoutGlobalScopes()
->where('organization_id', auth()->user()->organization_id);
}),
]),
->headerActions([
ExportAction::make()
->exporter(OrderExporter::class)
->modifyQueryUsing(function (Builder $query) {
return $query
->withoutGlobalScopes()
->where('organization_id', auth()->user()->organization_id);
}),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
ExportBulkAction::make()
->exporter(OrderExporter::class)
->modifyQueryUsing(function (Builder $query) {
return $query
->withoutGlobalScopes()
->where('organization_id', auth()->user()->organization_id);
}),
]),
No description
2 Replies
toeknee
toeknee3w ago
This is because of how we use livewire, it sends all the records data in the request. Header actions are faster because it's not sending all the data it's sending a command
Dennis Koch
Dennis Koch3w ago
Yeah, it's expected. As toeknee said: With the BulkAction you are sending 9000 IDs to the backend, which is just a lot of data (check the DevTools) and that takes time.

Did you find this page helpful?