apigee / apigee-edge-drupal

The Apigee Edge module enables you to integrate a Drupal 9 or 8 site with Apigee.
https://www.drupal.org/project/apigee_edge
GNU General Public License v2.0
32 stars 45 forks source link

Enable pager for Developer purchased plans & Team Apps #1066

Closed MahmoudSayed96 closed 2 months ago

MahmoudSayed96 commented 3 months ago

Hi,

Is your feature request related to a problem? Please describe.

I am working on a site where logged-in users can access purchased plans (subscriptions) and team apps. Without a pager and search functionality, viewing all purchase plans or apps is impossible.

my code for load developer purchased makes performance issues if the number of plans huge $dev_plans = $this->entityTypeManager ->getStorage('purchased_plan') ->loadByDeveloperId($devEmail);

Enabling entity query

I try to use entity query for loading developer purchased plans but not return null, when I use the loadByDeveloper function returns all purchased plans and this makes portal performant issue if the developer has a lot of plans.

Thanks,

kedarkhaire commented 3 months ago

Hi @MahmoudSayed96 Thanks for mentioning the issue, we will look into it. Thanks!

kedarkhaire commented 2 months ago

Hi @MahmoudSayed96 For your case, where you are loading huge number of plans filtered by developer, Here in your code you can add cache to purchased_plan lists per developer. So for the first time you will get the load, after that there wont be a performance issue, as it will load the plans from cache.

I hope this helps you.

Thanks!

kedarkhaire commented 2 months ago

Hi @MahmoudSayed96 We are closing this issue now, hope the solution worked for you. Feel free to reopen, if you face any further help. Thanks!

mxr576 commented 2 months ago

Here in your code you can add cache to purchased_plan lists per developer.

Where? :)