Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Performance] Do not load module logger from constructor #8200

Merged
merged 2 commits into from
Nov 21, 2022

Conversation

driusan
Copy link
Collaborator

@driusan driusan commented Oct 25, 2022

This is an attempt to solve the speed issues with demo-24.loris.ca.

In LORIS 23, there was no LORISInstance object that was used for getting active modules, nor was there a logger instantiated from the constructor. The added overhead of retrieving the log settings for every module instantiation and LorisInstance->getActiveModules instantiating every module is adding up to a lot of overhead in the critical path on demo-24.loris.ca.

This moves the logger instantiation to be done after the Module::factory call in the router instead of in the constructor. The result is that it's only done once, instead of done n times (where n is the number of modules.)

This doesn't get demo-24.loris.ca up to the speed of demo.loris.ca, but it's significantly closer.

It's not clear why this performance regression is only happening on demo and not in other environments.

This is an attempt to solve the speed issues with demo-24.loris.ca.

In LORIS 23, there was no LORISInstance object that was used for
getting active modules, nor was there a logger instantiated from the
constructor. The added overhead of retrieving the log settings for
every module instantiation and LorisInstance->getActiveModules
instantiating every module is adding up to a lot of overhead in
the critical path on demo-24.loris.ca.

This moves the logger instantiation to be done after the
Module::factory call in the router instead of in the constructor.
The result is that it's only done once, instead of done n times
(where n is the number of modules.)

This doesn't get demo-24.loris.ca up to the speed of demo.loris.ca,
but it's significantly closer.

It's not clear why this performance regression is only happening on
demo and not in other environments.
@maltheism maltheism added the Passed Manual Tests PR has undergone proper testing by at least one peer label Oct 31, 2022
@driusan driusan merged commit 1492ee4 into aces:24.1-release Nov 21, 2022
@ridz1208 ridz1208 added this to the 24.1.2 milestone Feb 1, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Passed Manual Tests PR has undergone proper testing by at least one peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants