Replies: 3 comments 3 replies
-
Yeah, that's just one of the reasons we've stopped recommending Currently the recommended way to use Backpack is the one in the video course, which is also the one that our generators use - the new fluent syntax in Backpack 4.1. But I just realised - we do NOT teach/recommend the same fluent syntax in the text tutorials - so thank you, I've just made a note to fix this.
Indeed, there might be a few things we can optimize in terms of queries on the List operation. We're open to suggestions. The biggest optimization we can make, though, is getting rid of DataTables. It has served us VERY well for a number of years, but now it's holding us back - difficult/impossible to support billions of rows (because it still needs pagination numbers), difficult o make one row a certain color. In a future version we plan to code something from scratch for this operation, probably using Livewire. But until then - optimization are welcome and very appreciated. I agree - we've diverged enough, let's keep this issue about the Show operation and open other Issues/Discussions for other stuff. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi. Due to not activity on many years i will close this discussion, if there is needed feel free to reopen or create a new one. Cheers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
@mahasadhu said this in #3132 - moving here because it's off-topic:
@tabacitu - I see... so that how it should be used.
Currently I'm using
setFromDb()
because that's what I saw on docs. And then I modify any columns that I need usingmodifyColumn()
ormodifyField()
.But then again, sometimes
modifyColumn()
ormodifyField()
does not work (not sure why), and I'm simply callremoveField()
thenaddField()
right after it to make it works.And today I just realized, that looks like

setFromDb()
executes query from information schema. And that query becomes the longest one to run / execute.Looks like there are quite some things that I need to update from my code 🤕
By the way today I tried to run

DB::getQueryLog()
on the search method in Backpack. And it seems like there are some things that could be optimized. For example this one below, there is one exact same query without any parameters that executed twice.It looks like being used to show total number of record / row in that particular table. It looks like the problem is around here
https://github.com/Laravel-Backpack/CRUD/blob/5414225a0040f2b8b18eb9e3a55d613bfb8d3db6/src/app/Http/Controllers/Operations/ListOperation.php#L76-L77
But still, I'm not sure whether this is my mistake, laravel / eloquent mistake, or actually a bug inside the Backpack.
This last bit could be in a different issue though.
Originally posted by @mahasadhu in Laravel-Backpack/CRUD#3132 (comment)
Beta Was this translation helpful? Give feedback.
All reactions