I've started to work on a project with the new company that I work for, some part of my job definition is to maintain existing website yet my experience on the used technologies is limited I can even say it's slim to none. The problem that I'm facing now is a seemingly easy problem yet I wasn't able to solve it so far.
Our system contains users and user licenses along with other stuff, whenever we try to edit a user license we are facing a particular problem that slows down our process arithmetically with the number of users rising.
Whenever we click on the edit action on the licenses page for an individual user, instead of just listing a basic edit form with only information about the selected user and license, it instead queries all the users and creates a list with all the users we have when we try to edit the license for 1 individual only. This is how our edit page looks like at the moment in below:
this user list basically consists of every single user in our database so it's leads us to have such queries fired after clicking the edit action.
I'm working with a limited number of users in my local to be able to work at least but it gets more dramatic with more data of course. I'll now share a quick snapshot from our easy_admin.yml file to show the current structure.
Easy_admin.yml file related parts
and the just a part of a License entity where we access the user.
The User entity itself is fairly larger and since my first goal is to find a way around without changing the entities really I won't publish it here now, but if that's no way around without such a change I can also share it too.
Our license listing page is using the same structure too as you can probably see yet the reason that we don't face that overwhelming slowness in the same page is we're using the pagination feature of the easyadmin while listing the licenses and we are using the "max_result: X" for that purpose, I thought maybe I could limit that to only one user on our edit page too but when I try that I have faced with the problem that has explained in detail in here:
“You cannot define a mapping item when in a sequence” when running phpunit in symfony
The thing I would like to know is if there is a way around in easy_admin.yml that can help me to fix that problem issue without making many changes in the entity itself, I'm basically trying to create an edit page like the show page with only the information of the user that is being edited, or basically a way to create overall better queries to solve the problem once and for all. Example pages to visualize what I meant:
License show page for and individual
Or like our user edit page here:
Thanks in advance for all the answers and the attempts of help.