getCustomers and setCustomers don't scale well

Created on 6 February 2022, about 3 years ago
Updated 27 February 2024, about 1 year ago

Problem/Motivation

We have a 'default' pricelist that gets assigned to new members of the site on registration. They might get put into a specific pricelist later, but this default pricelist is stuggling now with 15000+ members and running out of memory on the getCustomers() and setCustomers() functions which are just using standard field item lists.

Steps to reproduce

Have a default pricelist with many members. As the number of members increases, memory usage increases, performance reduces when the getCustomers and setCustomers functions are called.

Proposed resolution

I'm aware that the way this is being used is not really how it was designed, we will likely make changes to the way we use it and do some logic like no pricelist set = use default one, but others might be impacted by this, but not tracked it down is why i'm making an issue.

Option 1.
Just changing the code to work with the entity id's instead of the full entity would probably give quite a lot of headroom

Option 2.
Change the getCustomers and setCustomers to not use the standard functions for setting and getting the field values to a more custom version.

Remaining tasks

User interface changes

The pricelist display with the list of customers is likely broken with this huge number of customers as well, haven't tried that yet.

API changes

Data model changes

Feature request
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

🇦🇺Australia singularo Adelaide, AUS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024