Hi, im using jetstream livewire stack, i have uploaded the file. now i want to decrypt it. then show back the result to user.
the problem is my browser always crash while processing it. is there a way to make sure it wont crash the browser?, maybe something like promise await
// read the data
$data = file_get_contents($this->csv->getRealPath());
$helper = new \App\Helper\CryptoHelper();
$this->dispatch('refresh-datatable', $helper->decrypt($data))->to('decrypt-list');
@Snapey it gave me script is slowing down browser, and gives option to stop or debug script. my test file is 3.5mb. after looking at the response, it seems the decrypt is quite fast. since i already seen the decrypted data inside "component" => "snapshot".
so it might be printing a lot of data to browser that crash it.
@Snapey i tried, using paginate collection function i found online. but i kept getting error ->links() on array so i gave up middle way. for now i'll just reduce the rows shown only top 20. if in the future they wanted full file. i'll just make download decrypted file button.