Project

General

Profile

Actions

action #94667

closed

coordination #80142: [saga][epic] Scale out: Redundant/load-balancing deployments of openQA, easy containers, containers on kubernetes

coordination #92854: [epic] limit overload of openQA webUI by heavy requests

Optimize products/machines/test_suites API calls size:M

Added by tinita almost 3 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Feature requests
Target version:
Start date:
2021-06-24
Due date:
% Done:

0%

Estimated time:

Description

Motivation

The SQL to fetch the data is inefficient. For each item in the result set another SELECT FROM job_settings is executed. For https://openqa.suse.de/admin/test_suites that means about 2500 SELECTs currently.
Also the costly DateTime columns are fetched, although they are not needed.

Acceptance criteria

  • AC1: Significant performance improvements

Suggestions

  • The number of individual SQL queries doesn't go up with the number of items in the table anymore
  • Less columns are fetched
  • All three /api/v1/products, /api/v1/machines, /api/v1/test_suites are handled by the same code in lib/OpenQA/WebAPI/Controller/API/V1/Table.pm
  • Enable DBIC_TRACE=1 environment variable to see all SQL
  • https://github.com/os-autoinst/openQA/pull/3969 has a similar optimizations
  • Look at the existing patch from #94667#note-7
Actions

Also available in: Atom PDF