diff options
author | Nick Thomas <nick@gitlab.com> | 2019-08-01 17:18:17 +0100 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-05 06:42:34 -0700 |
commit | d3a3db4218e10c65c2e87c763ad02169f3736883 (patch) | |
tree | 4fc682cc529520bef4e69d740c9fdea99d46c2c3 /spec | |
parent | ded3b7574dbd6e1b3249c9e5bbcc61090c733142 (diff) | |
download | gitlab-ce-d3a3db4218e10c65c2e87c763ad02169f3736883.tar.gz |
Speed up loading and filtering deploy keys and their projects
This commit changes how we eager-load projects, routes, and namespaces
required by the deploy keys endpoint, getting a 10x improvement in my
local testing.
The endpoint still doesn't scale in-general, but going from ~13 seconds
to dump a 63K result to generating the same thing in ~1.6 seconds seems
like a good improvement to me.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/presenters/projects/settings/deploy_keys_presenter_spec.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb b/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb index 001545bb5df..b4bf39f3cdb 100644 --- a/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb +++ b/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb @@ -29,10 +29,6 @@ describe Projects::Settings::DeployKeysPresenter do it 'returns the enabled_keys size' do expect(presenter.enabled_keys_size).to eq(1) end - - it 'returns true if there is any enabled_keys' do - expect(presenter.any_keys_enabled?).to eq(true) - end end describe '#available_keys/#available_project_keys' do @@ -54,9 +50,5 @@ describe Projects::Settings::DeployKeysPresenter do it 'returns the available_project_keys size' do expect(presenter.available_project_keys_size).to eq(1) end - - it 'shows if there is an available key' do - expect(presenter.key_available?(deploy_key)).to eq(false) - end end end |