mirror of
https://github.com/friendica/friendica
synced 2025-04-27 17:10:10 +00:00
Performance improvements when displaying local posts
This commit is contained in:
parent
bae1f63424
commit
c82a1ed467
16 changed files with 1101 additions and 28 deletions
|
@ -204,7 +204,7 @@ class Conversations extends BaseProfile
|
|||
|
||||
$condition = DBA::mergeConditions($condition, ["((`gravity` = ? AND `wall`) OR
|
||||
(`gravity` = ? AND `vid` = ? AND `origin`
|
||||
AND EXISTS(SELECT `uri-id` FROM `post` WHERE `uri-id` = `post-user-view`.`thr-parent-id` AND `gravity` = ? AND `network` IN (?, ?))))",
|
||||
AND EXISTS(SELECT `uri-id` FROM `post` WHERE `uri-id` = `post-origin-view`.`thr-parent-id` AND `gravity` = ? AND `network` IN (?, ?))))",
|
||||
Item::GRAVITY_PARENT, Item::GRAVITY_ACTIVITY, Verb::getID(Activity::ANNOUNCE), Item::GRAVITY_PARENT, Protocol::ACTIVITYPUB, Protocol::DFRN]);
|
||||
|
||||
$condition = DBA::mergeConditions($condition, ['uid' => $profile['uid'], 'network' => Protocol::FEDERATED,
|
||||
|
@ -213,7 +213,7 @@ class Conversations extends BaseProfile
|
|||
$pager = new Pager($this->l10n, $this->args->getQueryString(), $itemspage_network);
|
||||
$params = ['limit' => [$pager->getStart(), $pager->getItemsPerPage()], 'order' => ['received' => true]];
|
||||
|
||||
$items_stmt = Post::select(['uri-id', 'thr-parent-id', 'gravity', 'author-id', 'received'], $condition, $params);
|
||||
$items_stmt = Post::selectOrigin(['uri-id', 'thr-parent-id', 'gravity', 'author-id', 'received'], $condition, $params);
|
||||
|
||||
// Set a time stamp for this page. We will make use of it when we
|
||||
// search for new items (update routine)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue