Skip to content
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: Many fixes #1554

Merged
merged 4 commits into from
Jan 21, 2025
Merged

fix: Many fixes #1554

merged 4 commits into from
Jan 21, 2025

Conversation

thierryskoda
Copy link
Collaborator

No description provided.

@thierryskoda thierryskoda force-pushed the ts/fixes-17-01-2025-2 branch from 0958d01 to 62dbde9 Compare January 18, 2025 15:20
Copy link
Contributor

github-actions bot commented Jan 18, 2025

Performance Comparison Report

  • Current: 1eb1f26 - 2025-01-21 13:25:54Z
  • Baseline: main (e9567ae) - 2025-01-21 13:24:45Z

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Type Duration Count
Avatar Image 10 runs render 0.6 ms → 1.0 ms (+0.4 ms, +66.7%) 🔴 1 → 1
Avatar Image 50 runs render 0.7 ms → 0.7 ms 1 → 1
Empty Avatar 10 runs render 1.1 ms → 1.0 ms (-0.1 ms, -9.1%) 1 → 1
Empty Avatar 50 runs render 1.0 ms → 0.9 ms (-0.1 ms, -6.1%) 1 → 1
Text Component with color prop - 10 runs render 0.5 ms → 0.6 ms (+0.1 ms, +20.0%) 🔴 1 → 1
Text Component with default props - 10 runs render 1.0 ms → 0.7 ms (-0.3 ms, -30.0%) 🟢 1 → 1
Text Component with translation key - 10 runs render 0.9 ms → 0.5 ms (-0.4 ms, -44.4%) 🟢 1 → 1
Text Component with weight and size - 10 runs render 0.7 ms → 0.7 ms 1 → 1
Show details
Name Type Duration Count
Avatar Image 10 runs render Baseline
Mean: 0.6 ms
Stdev: 0.5 ms (86.1%)
Runs: 1 0 1 1 0 0 1 1 1 0
Warmup runs: 1

Current
Mean: 1.0 ms
Stdev: 0.5 ms (47.1%)
Runs: 1 1 1 1 1 0 1 1 2 1
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Avatar Image 50 runs render Baseline
Mean: 0.7 ms
Stdev: 0.5 ms (66.1%)
Runs: 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 1 1 1 1 0 1 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 0 1 1 0 1 0 0
Warmup runs: 1

Current
Mean: 0.7 ms
Stdev: 0.5 ms (66.1%)
Runs: 1 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 1 0 1 1 0 1 1 0 1 1 0
Warmup runs: 0
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:
Empty Avatar 10 runs render Baseline
Mean: 1.1 ms
Stdev: 0.3 ms (28.7%)
Runs: 1 1 1 1 1 1 1 1 1 2
Warmup runs: 2

Current
Mean: 1.0 ms
Stdev: 0.5 ms (47.1%)
Runs: 1 1 1 0 2 1 1 1 1 1
Warmup runs: 2
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Empty Avatar 50 runs render Baseline
Mean: 1.0 ms
Stdev: 0.1 ms (14.4%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Warmup runs: 1

Current
Mean: 0.9 ms
Stdev: 0.3 ms (29.8%)
Runs: 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 0
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with color prop - 10 runs render Baseline
Mean: 0.5 ms
Stdev: 0.5 ms (105.4%)
Runs: 1 0 0 1 1 1 0 1 0 0
Warmup runs: 0

Current
Mean: 0.6 ms
Stdev: 0.5 ms (86.1%)
Runs: 1 1 1 0 0 1 0 1 0 1
Warmup runs: 0
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with default props - 10 runs render Baseline
Mean: 1.0 ms
Stdev: 0.7 ms (66.7%)
Runs: 2 2 1 1 1 0 1 1 1 0
Warmup runs: 3

Current
Mean: 0.7 ms
Stdev: 0.5 ms (69.0%)
Runs: 1 1 1 1 1 1 0 0 0 1
Warmup runs: 3
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with translation key - 10 runs render Baseline
Mean: 0.9 ms
Stdev: 0.3 ms (35.1%)
Runs: 1 1 1 1 1 0 1 1 1 1
Warmup runs: 1

Current
Mean: 0.5 ms
Stdev: 0.5 ms (105.4%)
Runs: 0 1 0 1 1 1 1 0 0 0
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with weight and size - 10 runs render Baseline
Mean: 0.7 ms
Stdev: 0.5 ms (69.0%)
Runs: 0 0 1 1 1 1 1 1 1 0
Warmup runs: 1

Current
Mean: 0.7 ms
Stdev: 0.5 ms (69.0%)
Runs: 1 1 0 1 1 0 1 1 0 1
Warmup runs: 0
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Render Count Changes

There are no entries

Render Issues

There are no entries

Added Scenarios

There are no entries

Removed Scenarios

There are no entries

Generated by 🚫 dangerJS against d685109

@thierryskoda thierryskoda force-pushed the ts/fixes-17-01-2025-2 branch from 62dbde9 to b4c84c8 Compare January 20, 2025 22:53
@thierryskoda thierryskoda marked this pull request as ready for review January 21, 2025 02:29
@thierryskoda thierryskoda requested a review from a team as a code owner January 21, 2025 02:29
@thierryskoda thierryskoda enabled auto-merge (squash) January 21, 2025 02:33
await client.conversations.sync();
await client.conversations.syncAllConversations("allowed");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why would we remove this?

const { theme } = useAppTheme();
const colorScheme = theme.isDark ? "dark" : "light";

const currentAccount = useCurrentAccount()!;

const { data: conversationId } = useQuery({
...getConversationQueryOptions({
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be memoized?

I guess we are pretty close to react compiler usage

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

IMO that doesn't change anything since it's with a useQuery but might be wrong

logger.warn(
`[useConversationQuery] Conversation not found in local DB, syncing conversations`
);
await client.conversations.sync();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this syncing all conversations now?
If not it will cause the list to sync, but conversations will be out of date

// Only the unknown conversations
isConversationConsentUnknown(conversation) &&
// Only the conversations with last message
conversation.lastMessage
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should be checking on lastMessage here, there's times where it can be empty

We will need to also make sure the requests isn't incrementing based on those either

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahh I thought conversations without lastMessage would always be non-relevant but good will remove.

}) {
const { peerInboxId, conversationId, topic } = args;

export function useDmConsent() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

ForCurrentInbox/Account

const currentAccount = useCurrentAccount()!;

return useMutation({
mutationFn: async (args: { consent: "allow" | "deny" }) => {
mutationFn: async (args: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

does moving the arguments to the functions instead of the hook fix anything or is it just more idiomatic?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just feel like if we're only using the args when calling the mutation, might as well pass them when we call the mutation.

@thierryskoda thierryskoda merged commit bf099f2 into main Jan 21, 2025
10 checks passed
@thierryskoda thierryskoda deleted the ts/fixes-17-01-2025-2 branch January 21, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants