Project

General

Profile

Actions

action #61919

closed

job_groups_and_parents is called for every request including images and api calls

Added by tinita over 4 years ago. Updated over 4 years ago.

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.

Actions

Also available in: Atom PDF