Users & Roles query/page display seems to be inefficient

Hi!

We have a journal with 12044 total users, using OJS 3.3.0-7.

We had to change PHP’s max_execution_time and memory_limit to be able to list the users when going to SettingsUsers & Roles (since we were hitting Maximum execution time exceeded and Allowed memory size exhausted).

This part is fine, but the real issue is that it’s taking some minutes to load all the users.
OJS is selecting and displaying all the users by default (which doesn’t seem to be appropriate nor the most correct solution).

I know that after loading all users you can limit the number of entries per page, but this is not the right solution either.
A limit should be imposed before running the query and displaying the results, not after loading 12000+ entries.

Is there any way to limit or paginate the amount of users displayed at a time?

Shouldn’t OJS, by default, limit/paginate this kind of result?

Thank you!

Hi @naoliv,

I’m rewriting this aspect of OJS for the 3.4 release, which will be out late this year or early next. See https://github.com/pkp/pkp-lib/issues/7127 for the details. If you can make it through until that release, you’ll see a pretty huge improvement. Meanwhile, are you sure your registrants are legit and not spam accounts? How quickly is the list growing?

Regards,
Alec Smecher
Public Knowledge Project Team

There are a few cases of duplicate users (the same person created 2 accounts with different e-mails, for example), but apparently they are all valid users. Most (11166) are readers.

And it’s great to hear that this is being improved.

Thank you very much!

Hi @naoliv,

Just checking on something in your first post:

OJS is selecting and displaying all the users by default (which doesn’t seem to be appropriate nor the most correct solution).

OJS should be displaying a paged list in the Users & Roles interface, but it sounds like yours isn’t. Mine looks like this:


Is yours displaying all 12000+ users at once?

Thanks,
Alec Smecher
Public Knowledge Project Team

Hi!

Yes, it’s loading all the 12000+ users at once.
At the bottom I have this:

In the config file I have:

[interface]

; Number of items to display per page; can be overridden on a per-journal basis
items_per_page = 25

; Number of page links to display; can be overridden on a per-journal basis
page_links = 10

I don’t know if I can configure/fix this somewhere, if possible.

Thank you!

Hi @naoliv,

What do you see in Website > Setup > Lists?

Regards,
Alec Smecher
Public Knowledge Project Team

Both values were set to 0.
Changing them to 25 and 10 did the trick!

Now why they were 0 and it wasn’t using the value from the config file, I don’t know :slight_smile:

Hi @naoliv,

Glad to hear it’s resolved! The journal settings are created using defaults from the configuration file when the journal is created, and the config file settings thereafter only apply to site-wide settings. Why they were zero, I’m not sure.

Regards,
Alec Smecher
Public Knowledge Project Team

Right.
Thank you very much for your help!