<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/spec/lib/banzai/commit_renderer_spec.rb, branch scripts-differences</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Add frozen_string_literal to spec/lib (part 1)</title>
<updated>2019-07-26T01:25:07+00:00</updated>
<author>
<name>Thong Kuah</name>
<email>tkuah@gitlab.com</email>
</author>
<published>2019-07-25T05:21:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f540ffcef6a278b3465dec43b99a6baaf51eeb51'/>
<id>f540ffcef6a278b3465dec43b99a6baaf51eeb51</id>
<content type='text'>
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Redis for CacheMarkDownField on non AR models</title>
<updated>2019-06-05T05:19:59+00:00</updated>
<author>
<name>Patrick Bajao</name>
<email>ebajao@gitlab.com</email>
</author>
<published>2019-06-05T04:59:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=2eecfd8f9d111c6518930b818a16daea8263b37f'/>
<id>2eecfd8f9d111c6518930b818a16daea8263b37f</id>
<content type='text'>
This allows using `CacheMarkdownField` for models that are not backed
by ActiveRecord.

When the including class inherits `ActiveRecord::Base` we include
`Gitlab::MarkdownCache::ActiveRecord::Extension`. This will cause the
markdown fields to be rendered and the generated HTML stored in a
`&lt;field&gt;_html` attribute on the record. We also store the version
used for generating the markdown.

All other classes that include this model will include the
`Gitlab::MarkdownCache::Redis::Extension`. This add the `&lt;field&gt;_html`
attributes to that model and will generate the html in them. The
generated HTML will be cached in redis under the key
`markdown_cache:&lt;class&gt;:&lt;id&gt;`. The class this included in must
therefore respond to `id`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows using `CacheMarkdownField` for models that are not backed
by ActiveRecord.

When the including class inherits `ActiveRecord::Base` we include
`Gitlab::MarkdownCache::ActiveRecord::Extension`. This will cause the
markdown fields to be rendered and the generated HTML stored in a
`&lt;field&gt;_html` attribute on the record. We also store the version
used for generating the markdown.

All other classes that include this model will include the
`Gitlab::MarkdownCache::Redis::Extension`. This add the `&lt;field&gt;_html`
attributes to that model and will generate the html in them. The
generated HTML will be cached in redis under the key
`markdown_cache:&lt;class&gt;:&lt;id&gt;`. The class this included in must
therefore respond to `id`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Support Markdown rendering using multiple projects</title>
<updated>2018-04-11T12:10:19+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2018-04-03T13:45:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=daad7144ec7c0173439eeadd61590442e40a6051'/>
<id>daad7144ec7c0173439eeadd61590442e40a6051</id>
<content type='text'>
This refactors the Markdown pipeline so it supports the rendering of
multiple documents that may belong to different projects. An example of
where this happens is when displaying the event feed of a group. In this
case we retrieve events for all projects in the group. Previously we
would group events per project and render these chunks separately, but
this would result in many SQL queries being executed. By extending the
Markdown pipeline to support this out of the box we can drastically
reduce the number of SQL queries.

To achieve this we introduce a new object to the pipeline:
Banzai::RenderContext. This object simply wraps two other objects: an
optional Project instance, and an optional User instance. On its own
this wouldn't be very helpful, but a RenderContext can also be used to
associate HTML documents with specific Project instances. This work is
done in Banzai::ObjectRenderer and allows us to reuse as many queries
(and results) as possible.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This refactors the Markdown pipeline so it supports the rendering of
multiple documents that may belong to different projects. An example of
where this happens is when displaying the event feed of a group. In this
case we retrieve events for all projects in the group. Previously we
would group events per project and render these chunks separately, but
this would result in many SQL queries being executed. By extending the
Markdown pipeline to support this out of the box we can drastically
reduce the number of SQL queries.

To achieve this we introduce a new object to the pipeline:
Banzai::RenderContext. This object simply wraps two other objects: an
optional Project instance, and an optional User instance. On its own
this wouldn't be very helpful, but a RenderContext can also be used to
associate HTML documents with specific Project instances. This work is
done in Banzai::ObjectRenderer and allows us to reuse as many queries
(and results) as possible.
</pre>
</div>
</content>
</entry>
<entry>
<title>Port `read_cross_project` ability from EE</title>
<updated>2018-02-22T16:11:36+00:00</updated>
<author>
<name>Bob Van Landuyt</name>
<email>bob@vanlanduyt.co</email>
</author>
<published>2017-12-11T14:21:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=148816cd67a314f17e79c107270cc708501bdd39'/>
<id>148816cd67a314f17e79c107270cc708501bdd39</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Resolve "DashboardController#activity.json is slow due to SQL"</title>
<updated>2017-11-06T16:52:56+00:00</updated>
<author>
<name>Francisco Javier López</name>
<email>fjlopez@gitlab.com</email>
</author>
<published>2017-11-06T16:52:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=bf0331dc72db658b012d58e33ca47da6d8f99d46'/>
<id>bf0331dc72db658b012d58e33ca47da6d8f99d46</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Adds cacheless render to Banzai object render</title>
<updated>2017-09-06T14:35:35+00:00</updated>
<author>
<name>Tiago Botelho</name>
<email>tiagonbotelho@hotmail.com</email>
</author>
<published>2017-08-23T16:53:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=6d8e102c740b75ac9e1d168a84f532f6d9ebaa65'/>
<id>6d8e102c740b75ac9e1d168a84f532f6d9ebaa65</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
