- 23 6月, 2016 3 次提交
-
-
由 Sean McGivern 提交于
Postgres and MySQL don't guarantee that pagination with `LIMIT` and `OFFSET` will work if the ordering isn't unique. From the Postgres docs: > When using `LIMIT`, it is important to use an `ORDER BY` clause that > constrains the result rows into a unique order. Otherwise you will get > an unpredictable subset of the query's rows Before: [1] pry(main)> issues = 1.upto(Issue.count).map { |i| Issue.sort('priority').page(i).per(1).map(&:id) }.flatten [2] pry(main)> issues.count => 81 [3] pry(main)> issues.uniq.count => 42 After: [1] pry(main)> issues = 1.upto(Issue.count).map { |i| Issue.sort('priority').page(i).per(1).map(&:id) }.flatten [2] pry(main)> issues.count => 81 [3] pry(main)> issues.uniq.count => 81
-
由 Paco Guzman 提交于
-
由 Connor Shea 提交于
-
- 22 6月, 2016 3 次提交
-
-
由 Rémy Coutable 提交于
[ci skip] Signed-off-by: NRémy Coutable <remy@rymai.me>
-
由 Sean McGivern 提交于
Rails's form helpers use the `$attr_before_type_cast` method where available, and this value only appears to be updated on assignment, not when the object is mutated in some other way: [1] pry(main)> mr = MergeRequest.new => #<MergeRequest:0x007fcf28395d88 ...> [2] pry(main)> mr.description = 'foo' => "foo" [3] pry(main)> mr.description << ' bar' => "foo bar" [4] pry(main)> mr.description => "foo bar" [5] pry(main)> mr.description_before_type_cast => "foo" [6] pry(main)> mr.description += ' bar' => "foo bar bar" [7] pry(main)> mr.description_before_type_cast => "foo bar bar"
-
由 Annabel Dunstone 提交于
-
- 21 6月, 2016 9 次提交
-
-
由 Yorick Peterse 提交于
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.
-
由 Alejandro Rodríguez 提交于
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.
-
由 Grzegorz Bizon 提交于
-
由 Kamil Trzcinski 提交于
-
由 Paco Guzman 提交于
-
由 Annabel Dunstone 提交于
-
由 Z.J. van de Weg 提交于
-
由 Paco Guzman 提交于
-
由 Annabel Dunstone 提交于
-
- 20 6月, 2016 3 次提交
-
-
由 winniehell 提交于
-
由 Paco Guzman 提交于
-
由 Connor Shea 提交于
-
- 18 6月, 2016 8 次提交
-
-
由 Paco Guzman 提交于
-
-
由 Z.J. van de Weg 提交于
-
由 Yorick Peterse 提交于
Previously we'd create a separate Metric instance for every method call that would exceed the method call threshold. This is problematic because it doesn't provide us with information to accurately get the _total_ execution time of a particular method. For example, if the method "Foo#bar" was called 4 times with a runtime of ~10 milliseconds we'd end up with 4 different Metric instances. If we were to then get the average/95th percentile/etc of the timings this would be roughly 10 milliseconds. However, the _actual_ total time spent in this method would be around 40 milliseconds. To solve this problem we now create a single Metric instance per method. This Metric instance contains the _total_ real/CPU time and the call count for every instrumented method.
-
由 Luke "Jared" Bennett 提交于
Updated shortcuts.png for docs Updated CHANGELOG Moved CHANGELOG entry updated shortcut docs
-
由 Paco Guzman 提交于
- As todos are created/updated inside the TodoService we repopulate the cache just there for both pending/done todos - Todos as mark as done from the TodosController we update cache there too - All the added methods are kept in the User class for cohesion
-
由 Patricio Cano 提交于
-
由 Paco Guzman 提交于
-
- 17 6月, 2016 10 次提交
-
-
由 Felipe Artur 提交于
-
由 Grzegorz Bizon 提交于
-
由 Rémy Coutable 提交于
Signed-off-by: NRémy Coutable <remy@rymai.me>
-
由 Kamil Trzcinski 提交于
Currently the RegexpError can be raised when processing next stage which leads to 500 in different places of code base. This adds early check that regexps used in only and except are valid.
-
由 Sean McGivern 提交于
Limit push email diff size to 30 files or 150 KB, whichever comes first.
-
由 Robert Speicher 提交于
[ci skip]
-
由 Robert Speicher 提交于
-
由 Connor Shea 提交于
Fixes #13980.
-
由 Connor Shea 提交于
-
由 Alejandro Rodríguez 提交于
-
- 16 6月, 2016 4 次提交
-
-
由 Paco Guzman 提交于
Besides when building the repository cache we cache those git counters too
-
由 James Lopez 提交于
-
由 Paco Guzman 提交于
-
由 James Lopez 提交于
This reverts commit 13e37a3e.
-