d470f3d195
This commit changes the way certain documents are rendered (currently only Notes) and how documents are redacted. Previously both rendering and redacting would run on a per document basis. The result of this was that for every document we'd have to run countless queries just to figure out if we could display a set of links or not. This commit changes things around so that redacting Markdown documents is no longer tied into the html-pipeline Gem. This in turn allows it to redact multiple documents in a single pass, thus reducing the number of queries needed. In turn rendering issue/merge request notes has been adjusted to take advantage of this new setup. Instead of rendering Markdown somewhere deep down in a view the Markdown is rendered and redacted in the controller (taking the current user and all that into account). This has been done in such a way that the "markdown()" helper method can still be used on its own. This particular commit also paves the way for caching rendered HTML on object level. Right now there's an accessor method Note#note_html which is used for setting/getting the rendered HTML. Once we cache HTML on row level we can simply change this field to be a column and call a "save" whenever needed and we're pretty much done. |
||
---|---|---|
.. | ||
1_settings.rb | ||
2_app.rb | ||
4_ci_app.rb | ||
5_backend.rb | ||
active_record_query_trace.rb | ||
attr_encrypted_no_db_connection.rb | ||
backtrace_silencers.rb | ||
bullet.rb | ||
carrierwave.rb | ||
chronic_duration.rb | ||
connection_fix.rb | ||
cookies_serializer.rb | ||
date_time_formats.rb | ||
default_url_options.rb | ||
devise.rb | ||
devise_password_length.rb.example | ||
disable_email_interceptor.rb | ||
doorkeeper.rb | ||
gitlab_shell_secret_token.rb | ||
go_get.rb | ||
gollum.rb | ||
hamlit.rb | ||
health_check.rb | ||
inflections.rb | ||
kaminari_config.rb | ||
metrics.rb | ||
mime_types.rb | ||
mysql_ignore_postgresql_options.rb | ||
omniauth.rb | ||
postgresql_limit_fix.rb | ||
postgresql_opclasses_support.rb | ||
premailer.rb | ||
public_key.rb | ||
rack_attack.rb.example | ||
rack_attack_git_basic_auth.rb | ||
rack_lineprof.rb | ||
relative_url.rb.sample | ||
secret_token.rb | ||
sentry.rb | ||
session_store.rb | ||
sherlock.rb | ||
sidekiq.rb | ||
smtp_settings.rb.sample | ||
static_files.rb | ||
time_zone.rb | ||
trusted_proxies.rb | ||
wrap_parameters.rb |