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

End previous background task as soon as begin task is called #3528

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

laevandus
Copy link
Contributor

@laevandus laevandus commented Dec 10, 2024

🔗 Issue Links

Resolves: IOS-43

🎯 Goal

Make sure previous task is ended when begin task is called immediately.

🛠 Implementation

There have been cases where background tasks are not ended correctly. Although I haven't been able to reproduce this with the demo app, I did find one way to reproduce it. Involves calling begin task twice. Could it be that in some configurations this can happen, not sure.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (docusaurus, tutorial, CMS)

@laevandus laevandus requested a review from a team as a code owner December 10, 2024 09:56
@laevandus laevandus force-pushed the fix/background-task-warning branch from 4667788 to e6e47a2 Compare December 10, 2024 09:59
@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamChat 7.03 MB 7.03 MB 0 KB 🟢
StreamChatUI 4.77 MB 4.77 MB 0 KB 🟢

@Stream-SDK-Bot
Copy link
Collaborator

SDK Performance

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 16.69 ms -66.9% 🔽 🔴
Duration 2.6 s 2.56 s 1.54% 🔼 🟢
Hitch time ratio 4 ms per s 6.55 ms per s -63.75% 🔽 🔴
Frame rate 75 fps 78.67 fps 4.89% 🔼 🟢
Number of hitches 1 1.4 -40.0% 🔽 🔴

@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Dec 10, 2024

SDK Size

title develop branch diff status
StreamChat 7.03 MB 7.03 MB 0 KB 🟢
StreamChatUI 4.77 MB 4.77 MB 0 KB 🟢

@laevandus laevandus changed the title [WIP] End background task as soon as begin task is called End previous background task as soon as begin task is called Dec 10, 2024
@laevandus laevandus added 🐞 Bug An issue or PR related to a bug 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK labels Dec 10, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@nuno-vieira nuno-vieira left a comment

Choose a reason for hiding this comment

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

LGTM! ✅ I just added a minor feedback to the changelog

Co-authored-by: Nuno Vieira <[email protected]>
@laevandus laevandus enabled auto-merge (squash) December 11, 2024 08:48
Copy link

sonarcloud bot commented Dec 11, 2024

@laevandus laevandus merged commit 5d11982 into develop Dec 11, 2024
14 checks passed
@laevandus laevandus deleted the fix/background-task-warning branch December 11, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug An issue or PR related to a bug 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants