Maatwebsite\Excel returning complex table `FromView` takes too long
I have a complex excel which I managed to build using FromView interface. I had to use FromView because I have to manage different rowspans but the problem is that it goes on Maximum execution time of 60 seconds exceeded error for more then 500+ rows and it needs like 15 sec for just 100 rows.
And what is the reason for not considering queue? You want the user whoever that is to wait for the excel to be exported, even though it takes more than a minute in your case?
If you are happy with that, then maybe increasing the timeout will work for you:
If it takes 15 seconds for 100 rows, then it will take at least 5 minutes for 2000 rows.
@Nakov Thank you for your answer but I really want to avoid the queues. I can't stay in peace just queuing it knowing that it is only about 2000 rows.
Anyway I did managed without using FromView but using WithMapping and WithEvents in which I did hard coded the customization of the cells with PhpSpreadsheet helpers and it takes like 1.7-1.8 sec for 2000 rows.
What I do is merging the cells and setting the value like this: