mirror of
https://github.com/discourse/discourse.git
synced 2025-09-12 21:10:47 +08:00
PERF: stop running VACUUM FULL only run VACUUM
This commit is contained in:
parent
c04bcf8655
commit
8d49091572
3 changed files with 13 additions and 4 deletions
|
@ -83,7 +83,16 @@ const CloakedCollectionView = Ember.CollectionView.extend({
|
|||
const mid = Math.floor((min + max) / 2),
|
||||
// in case of not full-window scrolling
|
||||
$view = childViews[mid].$(),
|
||||
viewBottom = $view.position().top + wrapperTop + $view.height();
|
||||
|
||||
// .position is quite expensive, shortcut here to get a slightly rougher
|
||||
// but much faster value
|
||||
parentOffsetTop = $view.offsetParent().offset().top,
|
||||
offsetTop = $view.offset().top,
|
||||
|
||||
viewBottom = (offsetTop - parentOffsetTop) + wrapperTop + $view.height();
|
||||
|
||||
|
||||
console.log(viewBottom);
|
||||
|
||||
if (viewBottom > viewportTop) {
|
||||
max = mid-1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue