gitlab-org--gitlab-foss/app/helpers
Jan Provaznik 090ca9c33e Use limit for search count queries
Search query is especially slow if a user searches a generic string
which matches many records, in such case search can take tens of
seconds or time out. To speed up the search query, we search only for
first 1000 records, if there is >1000 matching records we just display
"1000+" instead of precise total count supposing that with such amount
the exact count is not so important for the user.

Because for issues even limited search was not fast enough, 2-phase
approach is used for issues: first we use simpler/faster query to get
all public issues, if this exceeds the limit, we just return the limit.
If the amount of matching results is lower than limit, we re-run more
complex search query (which includes also confidential issues).
Re-running the complex query should be fast enough in such case because the
amount of matching issues is lower than limit.

Because exact total_count is now limited, this patch also switches to
to "prev/next" pagination.

Related #40540
2018-01-23 22:33:42 +01:00
..
accounts_helper.rb
appearances_helper.rb Add custom brand text on new project pages 2017-12-04 17:22:59 +01:00
application_helper.rb Resolve "Decouple multi-file editor from file list" 2017-12-21 15:05:47 +00:00
application_settings_helper.rb Permits 'password_authentication_enabled_for_git' parameter for ApplicationSettingsController 2018-01-19 12:04:45 +00:00
auth_helper.rb `current_application_settings` belongs on `Gitlab::CurrentSettings` 2017-08-31 13:38:33 +01:00
auto_devops_helper.rb Remove Auto DevOps checkboxes - backend 2017-12-04 17:47:38 +01:00
avatars_helper.rb Add `data-src` when image is to be lazy loaded, use `tag` helper instead of `image_tag` helper 2017-09-25 11:49:20 +05:30
award_emoji_helper.rb
blame_helper.rb Fix division by zero for blame age map 2017-08-24 22:27:31 -05:00
blob_helper.rb Only highlight search results under the highlighting size limit 2018-01-16 11:56:07 +00:00
boards_helper.rb Use path helper instead of url helper 2017-12-03 18:46:07 +00:00
branches_helper.rb Use --left-right and --max-count for counting diverging commits 2018-01-05 16:52:06 +00:00
breadcrumbs_helper.rb Merge branch 'icons-update-nav-bars' into 'master' 2017-09-29 13:32:17 +00:00
broadcast_messages_helper.rb
builds_helper.rb Use relative _path helper URLs in the GitLab UI 2017-12-07 11:19:37 -06:00
button_helper.rb Fixed clone buttons adding description when append_link is false 2017-12-05 17:39:18 -06:00
ci_status_helper.rb Replace ci_status_path with pipeline_path 2017-11-14 12:45:43 +01:00
clusters_helper.rb Hardcode clusters helper in CE 2017-12-18 14:35:08 +01:00
commits_helper.rb Replaced the remaining code-fork icons 2017-12-19 13:12:28 -06:00
compare_helper.rb Stop using `branch_names.include?` and use `branch_exists?` 2017-10-10 14:56:04 +00:00
components_helper.rb
conversational_development_index_helper.rb
dashboard_helper.rb
defer_script_tag_helper.rb
diff_helper.rb Fix changes dropdown ellipsis working across browsers 2018-01-09 11:29:57 +00:00
dropdowns_helper.rb Move "Move to different project" to sidebar 2017-09-03 22:03:17 -05:00
emails_helper.rb Initial work to add notification reason to emails 2018-01-16 19:17:55 -06:00
emoji_helper.rb
environment_helper.rb
environments_helper.rb
events_helper.rb Resolve "DashboardController#activity.json is slow due to SQL" 2017-11-06 16:52:56 +00:00
explore_helper.rb
external_wiki_helper.rb
form_helper.rb Use UserSerializer instead of `User.to_json` 2017-12-19 15:45:08 -06:00
git_helper.rb
gitlab_routing_helper.rb Address some comments with running a pipeline schedule 2017-12-12 15:07:23 -08:00
graph_helper.rb Fix graph notes number duplication. 2017-12-03 02:37:29 +03:00
groups_helper.rb Changed Group Icon URL Back to try option 2017-10-10 10:59:07 +02:00
hooks_helper.rb
icons_helper.rb Multi File Editor File icons 2018-01-03 10:08:14 +00:00
import_helper.rb Whitelist or fix additional `Gitlab/PublicSend` cop violations 2017-08-14 12:14:11 -04:00
instance_configuration_helper.rb Added ssh fingerprint, gitlab ci and pages information in an instance configuration page 2017-10-25 23:51:26 +03:00
issuables_helper.rb Merge branch '41247-timestamp' into 'master' 2018-01-18 23:05:28 +00:00
issues_helper.rb Resolve "Closed issue label in todo's styling is difficult to read" 2018-01-17 14:09:59 +00:00
javascript_helper.rb
kerberos_spnego_helper.rb
labels_helper.rb Hide issues and MRs in labels list if disabled 2017-12-11 20:38:53 +01:00
lazy_image_tag_helper.rb Another Change for cleanup 2017-10-05 17:49:11 +02:00
markup_helper.rb Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
mattermost_helper.rb
members_helper.rb Refactor member view by using presenter 2017-12-11 18:30:56 +01:00
merge_requests_helper.rb adding view and feature specs 2017-12-07 09:06:59 -05:00
milestones_helper.rb Add tooltip for milestone due date to issue and merge request lists 2017-09-20 07:11:49 +11:00
milestones_routing_helper.rb replace `is_group_milestone?` with `group_milestone?` 2017-08-29 11:14:41 +03:00
namespaces_helper.rb Guarantee the order of groups in the dropdown 2017-11-14 16:57:41 +01:00
nav_helper.rb Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
notes_helper.rb Support discussion locking in the backend 2017-09-14 14:50:32 +02:00
notifications_helper.rb Adds Rubocop rule for line break after guard clause 2017-11-16 17:58:29 +01:00
numbers_helper.rb Add 1000+ counters (instead of inifnite) to jobs controller 2017-10-06 14:43:48 +02:00
page_layout_helper.rb Add Page-Title header to tree and blob JSON endpoints 2017-09-26 17:31:47 +02:00
pagination_helper.rb Use Prev/Next pagination for exploring projects 2017-08-14 13:53:42 +02:00
performance_bar_helper.rb
pipeline_schedules_helper.rb Enable Layout/TrailingWhitespace cop and auto-correct offenses 2017-08-15 13:44:37 -04:00
preferences_helper.rb Merge branch '36679-non-authorized-user-may-see-wikis-or-pipeline-page' into 'security-10-2' 2017-12-08 13:44:36 -08:00
profiles_helper.rb Profile updates from providers 2017-09-06 16:38:52 +03:00
projects_helper.rb Remove downcase from special path helper 2018-01-04 11:22:04 -05:00
rss_helper.rb
runners_helper.rb
search_helper.rb Use limit for search count queries 2018-01-23 22:33:42 +01:00
selects_helper.rb Remove unused push_code_to_protected_branches 2018-01-05 23:45:12 +08:00
sentry_helper.rb
services_helper.rb 41054-Disallow creation of new Kubernetes integrations 2018-01-04 09:33:51 +00:00
sidekiq_helper.rb
snippets_helper.rb Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
sorting_helper.rb Enable sorting by name in the Groups dropdown 2017-12-20 19:34:50 +00:00
storage_health_helper.rb Move the circuitbreaker check out in a separate process 2017-12-08 09:11:39 +01:00
storage_helper.rb
submodule_helper.rb Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
system_note_helper.rb Fix locked and unlocked icons 2017-09-27 13:35:42 +01:00
tab_helper.rb Remove title attribute from sidebar elements 2017-09-13 14:30:31 +01:00
tags_helper.rb
time_helper.rb
todos_helper.rb Resolve "Closed issue label in todo's styling is difficult to read" 2018-01-17 14:09:59 +00:00
tree_helper.rb Merge branch '18040-rubocop-line-break-after-guard-clause' into 'master' 2017-11-20 09:22:14 +00:00
triggers_helper.rb
u2f_helper.rb
users_helper.rb
version_check_helper.rb Fix race condition with dispatcher.js 2017-08-15 16:09:36 +01:00
visibility_level_helper.rb Adds Rubocop rule for line break after guard clause 2017-11-16 17:58:29 +01:00
webpack_helper.rb WebIDE: Fix Commit bugs 2018-01-19 09:38:34 +00:00
wiki_helper.rb fixed up JS to use a js-* class 2017-09-06 11:55:23 +01:00
workhorse_helper.rb