ssb: Let about info load in its own time.
Some checks failed
Build Tilde Friends / Build-All (push) Failing after 4m45s

This commit is contained in:
Cory McWilliams 2025-05-09 07:27:35 -04:00
parent 02d789471f
commit 3eff1b08a9
2 changed files with 14 additions and 10 deletions

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🦀",
"previous": "&N/c9mpvJbvtyBsWoW+n9NtPMDRlQktALOGLSIyTeCW8=.sha256"
"previous": "&3J6eTdwcXbt841IXTSh4plSLiHY1+n+iXNRuT76MfQs=.sha256"
}

View File

@ -177,7 +177,6 @@ class TfElement extends LitElement {
users = users || {};
for (let row of rows) {
users[row.author] = Object.assign(
{follow_depth: following[row.author]?.d},
users[row.author] || {},
JSON.parse(row.about)
);
@ -399,6 +398,7 @@ class TfElement extends LitElement {
blocking: v.ob,
followed: v.if,
blocked: v.ib,
follow_depth: following[id]?.d,
};
by_count.push({count: v.of, id: id});
}
@ -409,14 +409,6 @@ class TfElement extends LitElement {
);
this.following = Object.keys(following);
let about_start_time = new Date();
users = await this.fetch_about(following, users);
console.log(
'about took',
(new Date() - about_start_time) / 1000.0,
'seconds for',
Object.keys(users).length,
'users'
);
start_time = new Date();
users = await this.fetch_user_info(users);
console.log(
@ -425,6 +417,18 @@ class TfElement extends LitElement {
'seconds'
);
this.users = users;
let self = this;
this.fetch_about(following, users).then(function(result) {
self.users = result;
console.log(
'about took',
(new Date() - about_start_time) / 1000.0,
'seconds for',
Object.keys(users).length,
'users'
);
});
console.log(
`load finished ${whoami} => ${this.whoami} in ${(new Date() - start_time) / 1000}`
);