gitlab-org--gitlab-foss/config/initializers
Sean McGivern fe0898cc14 Speed up used languages calculation on charts page
We removed calls from our code to Rugged::Repository#fetch_attributes:
<340e111e04>

However, we didn't remove calls from within Linguist. This method is only called
when calculating the languages for a repository on the Charts page:
<https://github.com/github/linguist/blob/v4.7.0/lib/linguist/lazy_blob.rb#L33-L36>

We can safely use our own Gitlab::Git::Attributes here. On staging, for the
GitLab CE repo, this makes the calculation take about a third of the time:

    # Before
    Benchmark.realtime do
      Linguist::Repository.new(repository.rugged,
                               repository.rugged.head.target_id).languages
    end
    #=> 23.67193900188431

    # After
    Benchmark.realtime do
      Linguist::Repository.new(repository.rugged,
                               repository.rugged.head.target_id).languages
    end
    #=> 8.945212290156633
2017-06-16 11:14:41 +01:00
..
0_acts_as_taggable.rb Fix Counter Cache not being disabled for acts-on-taggable 2017-05-26 11:08:18 +02:00
0_inflections.rb Add system_note_metadata model 2017-03-28 13:58:35 +02:00
0_post_deployment_migrations.rb
1_settings.rb Sync email address from specified omniauth provider 2017-06-07 11:13:57 -04:00
2_app.rb
5_backend.rb
6_validations.rb Improve storage validation after configuration structure update 2017-03-08 15:51:30 -03:00
7_redis.rb
8_gitaly.rb Don't reuse gRPC channels 2017-05-15 10:52:33 +02:00
8_metrics.rb Instrument MergeRequestDiff#load_commits 2017-06-14 12:01:38 +01:00
active_record_data_types.rb Add database helpers 'add_timestamps_with_timezone' and 'timestamps_with_timezone' 2017-06-13 22:44:13 +11:00
active_record_locking.rb Do not try to preload Commits when using Note.includes(:noteable) 2017-05-31 11:12:26 -05:00
active_record_preloader.rb Do not try to preload Commits when using Note.includes(:noteable) 2017-05-31 11:12:26 -05:00
active_record_table_definition.rb Add database helpers 'add_timestamps_with_timezone' and 'timestamps_with_timezone' 2017-06-13 22:44:13 +11:00
additional_headers_interceptor.rb
ar5_batching.rb
ar_speed_up_migration_checking.rb Make ActiveRecord::Migrator idempotent again in test env 2017-05-29 14:09:24 +02:00
attr_encrypted_no_db_connection.rb
backtrace_silencers.rb
bullet.rb Enable the bullet_logger setting; enable raise in test environment 2017-04-03 17:15:09 -04:00
carrierwave.rb Update Carrierwave and fog-core 2017-05-01 20:15:16 +00:00
chronic_duration.rb
connection_fix.rb
cookies_serializer.rb
date_time_formats.rb
default_url_options.rb
devise.rb Enable Style/SpaceInsideBrackets 2017-02-23 09:31:56 -06:00
devise_password_length.rb.example
disable_email_interceptor.rb
doorkeeper.rb Add specs for Doorkeeper resource_owner_authenticator 2017-03-07 15:08:15 +01:00
doorkeeper_openid_connect.rb Use relative paths for group/project/user avatars 2017-05-10 15:26:17 +11:00
email_template_interceptor.rb
etag_caching.rb Add middleware for ETag caching with Redis 2017-03-01 16:48:01 +01:00
fast_gettext.rb Bugfix: Always use the default language when generating emails. 2017-05-25 10:22:45 -05:00
fix_local_cache_middleware.rb Try out the monkey patch to fix the middleware 2017-03-11 01:25:02 +08:00
forbid_sidekiq_in_transactions.rb Fix keys seed 2017-06-02 12:37:57 -05:00
gettext_rails_i18n_patch.rb Fix Rubocop complains. 2017-05-02 13:14:11 -05:00
gitlab_shell_secret_token.rb
gitlab_workhorse_secret.rb
go_get.rb
gollum.rb Enable Style/MutableConstant 2017-02-23 09:31:56 -06:00
hamlit.rb Enable the Style/TrailingCommaInArguments cop 2017-05-10 18:25:45 +02:00
health_check.rb Enable Style/WordArray 2017-02-23 09:32:41 -06:00
kaminari_config.rb
math_lexer.rb
mime_types.rb
mysql_ignore_postgresql_options.rb No more and/or 2017-02-21 16:31:14 -06:00
omniauth.rb Remove explicit require calls, and use require_dependency when needed 2017-03-13 14:29:55 +01:00
peek.rb Ensure peek-performance_bar doesn't break existing functionalities 2017-06-09 17:21:39 +02:00
plantuml_lexer.rb
postgresql_cte.rb Use CTEs for nested groups and authorizations 2017-05-17 16:51:08 +02:00
postgresql_limit_fix.rb
postgresql_opclasses_support.rb
premailer.rb
rack_attack.rb.example
rack_attack_git_basic_auth.rb
rack_attack_logging.rb
rack_lineprof.rb No more and/or 2017-02-21 16:31:14 -06:00
relative_naming_ci_namespace.rb Rename BuildsController to JobsController 2017-05-17 20:17:30 +08:00
relative_url.rb.sample
request_context.rb Allow limiting logging in users from too many different IPs. 2017-03-06 15:41:24 +01:00
request_profiler.rb
routing_draw.rb
rspec_profiling.rb Enable RSpec profiling only if RSPEC_PROFILING_POSTGRES_URL is not empty 2017-05-19 12:15:49 +02:00
rugged_use_gitlab_git_attributes.rb Speed up used languages calculation on charts page 2017-06-16 11:14:41 +01:00
secret_token.rb Implement OpenID Connect identity provider 2017-03-07 14:54:35 +01:00
sentry.rb
server_uptime.rb 31616-add-uptime-of-gitlab-instance-in-admin-area 2017-05-29 15:46:25 -05:00
session_store.rb Update session cookie key name to be unique to instance in development 2017-06-01 08:27:40 -05:00
sherlock.rb
sidekiq.rb Added Gitlab::Database.config 2017-03-17 17:08:10 +01:00
smtp_settings.rb.sample
static_files.rb Enable the Style/TrailingCommaInArguments cop 2017-05-10 18:25:45 +02:00
time_zone.rb
trusted_proxies.rb Enable Style/SpaceInsideBrackets 2017-02-23 09:31:56 -06:00
warden.rb Make Warden set_user hook validate user ip uniquness 2017-03-06 15:41:25 +01:00
workhorse_multipart.rb Enable Style/MutableConstant 2017-02-23 09:31:56 -06:00
wrap_parameters.rb