<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/lib/banzai, branch ref-dropdown-jquery-objects</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Merge branch 'remove-banzai-pre-process' into 'master'</title>
<updated>2016-06-21T18:23:51+00:00</updated>
<author>
<name>Robert Speicher</name>
<email>robert@gitlab.com</email>
</author>
<published>2016-06-21T18:23:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ae63172dd22c245c3d2c0a509971dcb97622e55b'/>
<id>ae63172dd22c245c3d2c0a509971dcb97622e55b</id>
<content type='text'>

Move pre_process into render_result

This MR moves `Banzai::Renderer.pre_process` into `Banzai::Renderer.render_result`.

The `pre_process` method was called even when its output would be ignored. See 11a5a4f359ee57029dbfcc9185fc6b47243ea2aa for more details.

See merge request !4830</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Move pre_process into render_result

This MR moves `Banzai::Renderer.pre_process` into `Banzai::Renderer.render_result`.

The `pre_process` method was called even when its output would be ignored. See 11a5a4f359ee57029dbfcc9185fc6b47243ea2aa for more details.

See merge request !4830</pre>
</div>
</content>
</entry>
<entry>
<title>Move pre_process into render_result</title>
<updated>2016-06-21T15:39:01+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2016-06-21T15:07:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=d9a4ca5975b4fb91b147930d863f0bb4b9619a64'/>
<id>d9a4ca5975b4fb91b147930d863f0bb4b9619a64</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize Banzai::Filter::RelativeLinkFilter</title>
<updated>2016-06-21T14:53:16+00:00</updated>
<author>
<name>Alejandro Rodríguez</name>
<email>alejorro70@gmail.com</email>
</author>
<published>2016-06-21T14:53:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ca696175dbbf664f25a87a300b99f2b97fa5db70'/>
<id>ca696175dbbf664f25a87a300b99f2b97fa5db70</id>
<content type='text'>
    A lot of git operations were being repeated, for example, to build a url
    you would ask if the path was a Tree, which would call a recursive routine
    in Gitlab::Git::Tree#where, then ask if the path was a Blob, which would
    call a recursive routine at Gitlab::Git::Blob#find, making reference to
    the same git objects several times. Now we call Rugged::Tree#path, which
    allows us to determine the type of the path in one pass.

    Some other minor improvement added, like saving commonly used references
    instead of calculating them each time.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    A lot of git operations were being repeated, for example, to build a url
    you would ask if the path was a Tree, which would call a recursive routine
    in Gitlab::Git::Tree#where, then ask if the path was a Blob, which would
    call a recursive routine at Gitlab::Git::Blob#find, making reference to
    the same git objects several times. Now we call Rugged::Tree#path, which
    allows us to determine the type of the path in one pass.

    Some other minor improvement added, like saving commonly used references
    instead of calculating them each time.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'fix-out-of-bounds-markdown-refs' into 'master'</title>
<updated>2016-06-18T20:48:58+00:00</updated>
<author>
<name>Robert Speicher</name>
<email>robert@gitlab.com</email>
</author>
<published>2016-06-18T20:48:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=98cede7ebeae9dac994b35b66be6aab14eb932b3'/>
<id>98cede7ebeae9dac994b35b66be6aab14eb932b3</id>
<content type='text'>

Fix RangeError exceptions when referring to issues or merge requests outside of max database values

When using #XYZ in Markdown text, if XYZ exceeds the maximum value of a signed 32-bit integer, we get an exception when the Markdown render attempts to run `where(iids: XYZ)`. Introduce a method that will throw out out-of-bounds values.
    
Closes #18777

See merge request !4777</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Fix RangeError exceptions when referring to issues or merge requests outside of max database values

When using #XYZ in Markdown text, if XYZ exceeds the maximum value of a signed 32-bit integer, we get an exception when the Markdown render attempts to run `where(iids: XYZ)`. Introduce a method that will throw out out-of-bounds values.
    
Closes #18777

See merge request !4777</pre>
</div>
</content>
</entry>
<entry>
<title>Fix RangeError exceptions when referring to issues or merge requests outside of max database values</title>
<updated>2016-06-18T20:07:38+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2016-06-18T17:55:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=7c9eba891963451a1feb2e5bbef90fdcac1496ff'/>
<id>7c9eba891963451a1feb2e5bbef90fdcac1496ff</id>
<content type='text'>
When using #XYZ in Markdown text, if XYZ exceeds the maximum value of a signed 32-bit integer, we
get an exception when the Markdown render attempts to run `where(iids: XYZ)`. Introduce a method
that will throw out out-of-bounds values.

Closes #18777
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using #XYZ in Markdown text, if XYZ exceeds the maximum value of a signed 32-bit integer, we
get an exception when the Markdown render attempts to run `where(iids: XYZ)`. Introduce a method
that will throw out out-of-bounds values.

Closes #18777
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bug in `WikiLinkFilter`.</title>
<updated>2016-06-18T08:40:40+00:00</updated>
<author>
<name>Timothy Andrew</name>
<email>mail@timothyandrew.net</email>
</author>
<published>2016-06-18T08:40:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=6d169d36cabda783116bcb8e2e6f73254566a670'/>
<id>6d169d36cabda783116bcb8e2e6f73254566a670</id>
<content type='text'>
1. An exception would be raised if the filter was called with an invalid
   URI. Mainly because we weren't catching the `Addressable` exception.

2. This commit fixes it and adds a spec for the filter.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. An exception would be raised if the filter was called with an invalid
   URI. Mainly because we weren't catching the `Addressable` exception.

2. This commit fixes it and adds a spec for the filter.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'banzai-issue-filter-queries' into 'master'</title>
<updated>2016-06-16T20:49:13+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2016-06-16T20:49:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=84632f0aff1d509a89bb09940e49d3f43d189c56'/>
<id>84632f0aff1d509a89bb09940e49d3f43d189c56</id>
<content type='text'>

Reduce SQL query counts in IssueReferenceFilter

## What does this MR do?

This MR adds a preparation phase for reference filters that allows them to prepare/create data structures used while iterating over HTML nodes. In this particular case the preparation phase is used for issue references to greatly cut down the amount of queries executed to get projects/issues for Markdown references.

## Are there points in the code the reviewer needs to double check?

No.

## Why was this MR needed?

Rendering Markdown containing issue references would run at most two queries for every issue reference: one to get the project and one to get the issue from said project. When rendering Markdown with lots of issue references this would result in _a lot_ of queries being executed.

## What are the relevant issue numbers?

#18042

See merge request !4410</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Reduce SQL query counts in IssueReferenceFilter

## What does this MR do?

This MR adds a preparation phase for reference filters that allows them to prepare/create data structures used while iterating over HTML nodes. In this particular case the preparation phase is used for issue references to greatly cut down the amount of queries executed to get projects/issues for Markdown references.

## Are there points in the code the reviewer needs to double check?

No.

## Why was this MR needed?

Rendering Markdown containing issue references would run at most two queries for every issue reference: one to get the project and one to get the issue from said project. When rendering Markdown with lots of issue references this would result in _a lot_ of queries being executed.

## What are the relevant issue numbers?

#18042

See merge request !4410</pre>
</div>
</content>
</entry>
<entry>
<title>Banzai::Filter::ExternalLinkFilter use XPath</title>
<updated>2016-06-16T12:13:29+00:00</updated>
<author>
<name>Paco Guzman</name>
<email>pacoguzmanp@gmail.com</email>
</author>
<published>2016-06-16T07:56:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ae6a54f73caaa0d9023d09f0820f3bee1e0cd0d4'/>
<id>ae6a54f73caaa0d9023d09f0820f3bee1e0cd0d4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Reduce queries in IssueReferenceFilter</title>
<updated>2016-06-16T12:04:45+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2016-06-01T15:39:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=19a290e7bfcb5e74a0e9975fd3f7396ca0e2e990'/>
<id>19a290e7bfcb5e74a0e9975fd3f7396ca0e2e990</id>
<content type='text'>
This reduces the number of queries executed in IssueReferenceFilter by
retrieving the various projects/issues that may be referenced in batches
_before_ iterating over all the HTML nodes.

A chunk of the logic resides in AbstractReferenceFilter so it can be
re-used by other filters in the future.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reduces the number of queries executed in IssueReferenceFilter by
retrieving the various projects/issues that may be referenced in batches
_before_ iterating over all the HTML nodes.

A chunk of the logic resides in AbstractReferenceFilter so it can be
re-used by other filters in the future.
</pre>
</div>
</content>
</entry>
<entry>
<title>Banzai::Filter::UploadLinkFilter use XPath</title>
<updated>2016-06-16T09:26:56+00:00</updated>
<author>
<name>Paco Guzman</name>
<email>pacoguzmanp@gmail.com</email>
</author>
<published>2016-06-15T17:00:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=46696bde83736a83ec6f54f05795b003793b5865'/>
<id>46696bde83736a83ec6f54f05795b003793b5865</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
