Rework search suggestions for performance (#492)
This commit is contained in:
parent
1ab8f31517
commit
75fd653be3
8 changed files with 312 additions and 448 deletions
|
@ -57,15 +57,19 @@ export class FoafsModel {
|
|||
}
|
||||
|
||||
// grab 10 of the users followed by the user
|
||||
this.sources = sampleSize(
|
||||
Object.keys(this.rootStore.me.follows.followDidToRecordMap),
|
||||
10,
|
||||
)
|
||||
runInAction(() => {
|
||||
this.sources = sampleSize(
|
||||
Object.keys(this.rootStore.me.follows.followDidToRecordMap),
|
||||
10,
|
||||
)
|
||||
})
|
||||
if (this.sources.length === 0) {
|
||||
return
|
||||
}
|
||||
this.foafs.clear()
|
||||
this.popular.length = 0
|
||||
runInAction(() => {
|
||||
this.foafs.clear()
|
||||
this.popular.length = 0
|
||||
})
|
||||
|
||||
// fetch their profiles
|
||||
const profiles = await this.rootStore.agent.getProfiles({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue