[DISCUSSION]Skip job groups in _group_result when starting with '~' #582
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As of 2016-02-26 we encountered a major performance regression on
openqa.suse.de as for yet unknown reason many more jobs than in before are
considered for parsing the group results on the index page and group overview
pages in specific job groups.
As more than 20k jobs are fetched from the database the query itself for job
settings is slow as well as the subsequent processing in
OpenQA::WebAPI::Controller::Main::_group_result.
This is a workaround to skip the parsing of job groups if they start with a
'~'. This way "special job groups" can be renamed accordingly to ensure
acceptable performance.
Performance was measured retrieving the index page with a database dump from
openqa.suse.de from 2016-02-26 with the command:
export date=2016-02-26; time sudo -u geekotest
OPENQA_CONFIG=local/stage_openqa_suse_de_2016-02-26
OPENQA_DATABASE=stage script/openqa get / > /dev/null 2>&1
Performance results:
Related issue: https://progress.opensuse.org/issues/10960