Actions
action #61919
closedjob_groups_and_parents is called for every request including images and api calls
Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
2020-01-08
Due date:
% Done:
100%
Estimated time:
Description
https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI.pm#L87
$self->hook(
before_dispatch => sub {
my ($controller) = @_;
OpenQA::Setup::set_secure_flag_on_cookies($controller);
$controller->stash('job_groups_and_parents', job_groups_and_parents);
});
The function makes two DB queries.
That means there are many unnecessary DB queries on some pages.
I can see the call 5 times on the "All Tests" page and two times on the test overview.
We should find out in that call if we deliver a HTML page or something else and only do that call for HTML.
Updated by tinita about 5 years ago
One possibility could be to check if the url starts with /asset/
or /api/
and then skip the call. Other ideas?
Updated by tinita about 5 years ago
- Subject changed from job_groups_and_parents is called for every request including images to job_groups_and_parents is called for every request including images and api calls
Updated by tinita about 5 years ago
- Status changed from New to In Progress
- Assignee set to tinita
- Target version changed from future to Current Sprint
Updated by tinita about 5 years ago
Updated by tinita about 5 years ago
- Status changed from In Progress to Feedback
- % Done changed from 0 to 100
Actions