Skip to content

Commit

Permalink
Optimize page loads by reducing the feeds' initial load counts
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee committed Mar 31, 2021
1 parent bef8a11 commit 4c89bde
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion static/js/com/feed.js
Expand Up @@ -140,7 +140,7 @@ export class Feed extends LitElement {
} else {
results = results.concat((await session.ctzn.view('ctzn.network/feed-view', {limit: this.limit, reverse: true, lt}))?.feed)
}
console.log(results)
console.log(this.limit, results)

if (!more && _cache?.path === window.location.pathname && _cache?.results?.[0]?.url === results[0]?.url) {
// stick with the cache but update the signal metrics
Expand Down
2 changes: 1 addition & 1 deletion static/js/views/main.js
Expand Up @@ -158,7 +158,7 @@ class CtznMainView extends LitElement {
${this.renderMockComposer()}
${this.isEmpty ? this.renderEmptyMessage() : ''}
<ctzn-feed
limit="50"
limit="15"
@load-state-updated=${this.onFeedLoadStateUpdated}
@publish-reply=${this.onPublishReply}
@delete-post=${this.onDeletePost}
Expand Down
2 changes: 1 addition & 1 deletion static/js/views/notifications.js
Expand Up @@ -81,7 +81,7 @@ class CtznNotifications extends LitElement {
</div>
<ctzn-notifications-feed
cleared-at=${this.notificationsClearedAt}
limit="50"
limit="15"
@load-state-updated=${this.onFeedLoadStateUpdated}
@publish-reply=${this.onPublishReply}
></ctzn-notifications-feed>
Expand Down
2 changes: 1 addition & 1 deletion static/js/views/user.js
Expand Up @@ -600,7 +600,7 @@ class CtznUser extends LitElement {
${this.isEmpty ? this.renderEmptyMessage() : ''}
<ctzn-feed
.source=${this.userId}
limit="50"
limit="15"
@load-state-updated=${this.onFeedLoadStateUpdated}
@publish-reply=${this.onPublishReply}
@delete-post=${this.onDeletePost}
Expand Down

1 comment on commit 4c89bde

@vercel
Copy link

@vercel vercel bot commented on 4c89bde Mar 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.