Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
When cache_collection_render runs we end up reading and writing
things to redis even if we already have the rendered field cached
in the DB. This commit avoids using redis at all whenever we have
the field already rendered in the DB cache.
|
|
Enables frozen for the following:
* lib/*.rb
* lib/banzai/**/*.rb
* lib/bitbucket/**/*.rb
* lib/constraints/**/*.rb
* lib/container_registry/**/*.rb
* lib/declarative_policy/**/*.rb
Partially addresses #47424.
|
|
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
|
|
|
|
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo
secondary node). But in GitLab CE it also might be useful to have the
"read-only" idea around. So port it back to GitLab CE.
Also having the principle of read-only in GitLab CE would hopefully
lead to less errors introduced, doing write operations when there
aren't allowed for read-only calls.
Closes gitlab-org/gitlab-ce#37534.
|
|
|
|
An upcoming update to rubocop-gitlab-security added additional
violations.
|
|
This bails out of `cacheless_render` immediately unless the provided
text is present, since there's no point.
This is a slight improvement in our test performance. Across the
creation of 1,000 `Namespace` records, which caches the `description`
field and which is blank by default in its factory, this saves about
four seconds, which... sure. Why not.
|
|
|
|
|
|
|
|
|
|
Using `extend self` prevents GitLab Performance Monitoring from being
able to track class methods.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23347
|
|
This commit adds a number of _html columns and, with the exception of Note,
starts updating them whenever the content of their partner fields changes.
Note has a collision with the note_html attr_accessor; that will be fixed later
A background worker for clearing these cache columns is also introduced - use
`rake cache:clear` to set it off. You can clear the database or Redis caches
separately by running `rake cache:clear:db` or `rake cache:clear:redis`,
respectively.
|
|
|
|
Rails.cache.read_multi
|
|
|
|
The method Banzai::Renderer.pre_process would always be called,
regardless of whether the Markdown to render was already cached or not.
In cache the document _was_ cached the output of the pre-processing
pipeline was ignored resulting in it doing nothing but wasting CPU
cycles.
This commit moves Banzai::Renderer.pre_process into
Banzai::Renderer.render_result so that it's _only_ used when needed.
|
|
|
|
|
|
This reverts commit d337d5e7137d9b3fd0f9b8890a3ba9296323acc7.
|
|
This reverts commit 4b027bc93a7875c3937f6b90ac1049b4a4d72da5.
|
|
|
|
|
|
|