Response time and size

Hello, during playing around with laravel-filament I realized that response is quite huge. For example I have CustomerResource table, which has no relations and it is pretty straightforward: ->columns([ Tables\Columns\TextColumn::make('firstName')->searchable(), Tables\Columns\TextColumn::make('lastName')->searchable(), Tables\Columns\TextColumn::make('mobileNumber')->searchable(), Tables\Columns\TextColumn::make('email')->searchable(), // TextInputColumn::make('mobileNumber'), ]) Yet, when I choose 50 records, response from serves has over 700kB and takes over 1s. I guess it is normal, since livewire is generating whole html on server side, but is there any way how to tweak it a little? I have bulkactions usecase where i need to render hundreds of records on one page and change status of it and response has over 70MBs and browser renders it in about 40s. Thanks for any tips! Cheers.
No description
Solution:
Compression is on nginx configuration on the server you have to google it πŸ™‚ depend on your system...
Jump to solution
6 Replies
Lara Zeus
Lara Zeusβ€’10mo ago
I guess you're in dev environment so cache everything and compare the results in prod you advised to cache everything
php artisan optimize
php artisan config:cache
php artisan route:cache
php artisan event:cache
php artisan icons:cache
php artisan view:cache
php artisan optimize
php artisan config:cache
php artisan route:cache
php artisan event:cache
php artisan icons:cache
php artisan view:cache
also add indexing to db if needed
i really can't play that
Thx for answer, @Lara Zeus . Unfortunately, it did not help, it's the same. I added indexes as well, still the same. When I look at livewire/update response for 50 records, it has "html" object containing 700k characters. I tried to do the same with filament demo, and it works better, as the response is compressed, see image. My app is not compressing response, is there a way how to enable compression at least?
No description
Solution
Lara Zeus
Lara Zeusβ€’10mo ago
Compression is on nginx configuration on the server you have to google it πŸ™‚ depend on your system
i really can't play that
I needed to install erlandmuchasaj/laravel-gzip as I run it with artisan serve. Ok, so now I am compressing it, which is much better but ... I need to turn off displaying "all" records 😦
krekas
krekasβ€’10mo ago
It's just how livewire works. Only way to compress using server
i really can't play that
Yeah, got it now. Thanks!