-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some of the freezes experienced by the admins when the community updates #16384
Conversation
Jenkins BuildsClick to see older builds (77)
|
e55e907
to
9100e1c
Compare
f8e458b
to
e389f38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok in general. Some small suggestions only.
function matchesAlias(name, filter) { | ||
return name.split(" ").some(p => p.startsWith(filter)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why alias needs to be handled in a special way here. If it's not necessary we could optimize it in a similar way as described here: https://github.com/status-im/status-desktop/pull/16363/files#r1774985033
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this and it ended up being way slower actually 🤔
Maybe it's because there are so many properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's quite surprising 🤔 So let's leave it as it is :)
Bth, looking into code of SFPM
I have a temptation to rewrite it from scratch 🤦
FastExpressionFilter { | ||
expression: !!model.airdropAddress | ||
expectedRoles: ["airdropAddress"] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's about check if airdropAddress
is not empty string, ValueFilter
could be used:
ValueFilter {
roleName: "airdropAddress"
value: ""
inverted: true
}
9100e1c
to
6d8058f
Compare
caf63e6
to
c8c7aef
Compare
c11f308
to
6bf5125
Compare
c8c7aef
to
af6bf72
Compare
f3efcdb
to
fbd6c7c
Compare
af6bf72
to
e3d922e
Compare
@igor-sirotin reminder to review please |
@glitchminer can you test when you have time. No need for a full regression test. You can check the "what to test" section in the PR |
82cb9d8
to
377f364
Compare
status-go updated to point to develop. |
377f364
to
dc533c9
Compare
dc533c9
to
1231e7a
Compare
1231e7a
to
e32bf8d
Compare
Rebased. @caybro could you do the testing on this one please. |
Sure; any hints on how to trigger the behavior and how to test? |
I don,t think you'll be able to replicate the freezes, because you're gonna need to be an admin in a community as big as the Status community, but just testing that everything in the Affected Areas listed above still works as expected would be good. For example, making sure you get the airdrop address of new joiners without having to restart the app (check the member list in the airdrop admin panel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Iterates #16043 When the community gets updated by any means, we reconstruct the section item, which is already bad, but we also re-fetch all tokens and all shared addresses, which in turn re-updates models for no reason. Instead, I make sure to only fetch those on first section build, then, I get the new shared addresses when members join using the request to join response that comes from status-go
e32bf8d
to
d89fc4e
Compare
Rebased. I'll merge once it's green |
Force merging as the e2e fail is a test in the onboarding, which I didn't touch at all |
What does the PR do
Iterates #16043
When the community gets updated by any means, we reconstruct the section item, which is already bad, but we also re-fetch all tokens and all shared addresses, which in turn re-updates models for no reason.
Instead, I make sure to only fetch those on first section build, then, I get the new shared addresses when members join using the request to join response that comes from status-go
Status-go PR to fix the correct return of the shared addresses: status-im/status-go#5867
A further improvement IMO would be to stop redoing the section when the community updates, but we'll need to be careful, because it might break a lot of places that would normally update automatically.
Also includes a commit that makes the input focus and fixes the order of members in the airdrop popups.
Affected areas
Architecture compliance
My PR is consistent with this document: Architecture guidelines
Impact on end user
The general responsiveness of the app when the community updates for admins should be better (no or less freezes)
How to test
Update the community, make people join, check that you have their airdrop address in the airdrop popup.
Risk
Tick one:
Worst case is that some properties don't get updated until a restart (for example the airdrop addresses of members)