Memory size get exhausted if we try to use this module in system which has 10,000+ users

Created on 18 April 2024, 8 months ago

Problem/Motivation

Memory size get exhausted if we try to use this module in system which has 10,000+ users

Allowed memory size of 53687????? bytes exhausted (tried to allocate 20???? bytes) in
on line

Steps to reproduce

Try to use this module in a system when has 10,000+ users

Proposed resolution

There should be a limit apply in the entity search query.

modules\contrib\ckeditor_mentions\src\Plugin\MentionsType\User.php : Line 55

"
protected function getQuery(): AlterableInterface {

$query = $this->entityManager
->getStorage($this->getPluginDefinition()['entity_type'])
->getQuery()
->accessCheck();

$or = $query->orConditionGroup()
->condition('name', $this->getMatch(), 'CONTAINS')
->condition('mail', $this->getMatch(), 'CONTAINS');

return $query->condition($or); // ***** default Limit should be here. *******
}
"

I have added limit and its working fine.

return $query->condition($or)->range(0, 1000);

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇮🇳India biplab_drupal

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024