Skip to content

refactor: Make event dispatch ordered by receive time.#2392

Merged
iphydf merged 3 commits into
TokTok:masterfrom
iphydf:ordered-events
Jan 15, 2024
Merged

refactor: Make event dispatch ordered by receive time.#2392
iphydf merged 3 commits into
TokTok:masterfrom
iphydf:ordered-events

Conversation

@iphydf

@iphydf iphydf commented Aug 22, 2023

Copy link
Copy Markdown
Member

This change is Reviewable

@iphydf iphydf added this to the v0.2.19 milestone Aug 22, 2023
@iphydf iphydf force-pushed the ordered-events branch 2 times, most recently from 8e372bc to 07f91b7 Compare August 22, 2023 19:39
@Green-Sky

Green-Sky commented Aug 22, 2023

Copy link
Copy Markdown
Member

will first port my #2378 to this change and then give review done.

@iphydf iphydf force-pushed the ordered-events branch 6 times, most recently from 919e79b to beb0ef9 Compare August 23, 2023 09:51
@iphydf iphydf marked this pull request as draft August 23, 2023 11:08
@iphydf iphydf changed the title refactor: Make event dispatch ordered by receive time. [WIP] refactor: Make event dispatch ordered by receive time. Aug 23, 2023
@iphydf iphydf force-pushed the ordered-events branch 6 times, most recently from 2436d0d to c928ff7 Compare August 31, 2023 00:12
@iphydf iphydf modified the milestones: v0.2.19, v0.2.20 Nov 7, 2023
@codecov

codecov Bot commented Nov 10, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 2078 lines in your changes are missing coverage. Please review.

Comparison is base (001d00a) 71.11% compared to head (b4d8826) 66.78%.

Files Patch % Lines
toxcore/tox_event.c 39.14% 384 Missing ⚠️
toxcore/events/group_message.c 0.00% 93 Missing ⚠️
toxcore/events/group_invite.c 0.00% 92 Missing ⚠️
toxcore/events/group_peer_exit.c 18.86% 86 Missing ⚠️
toxcore/events/group_private_message.c 0.00% 86 Missing ⚠️
toxcore/events/group_custom_packet.c 0.00% 79 Missing ⚠️
toxcore/events/group_custom_private_packet.c 0.00% 79 Missing ⚠️
toxcore/events/group_peer_name.c 0.00% 79 Missing ⚠️
toxcore/events/group_topic.c 0.00% 79 Missing ⚠️
toxcore/tox_dispatch.c 56.90% 78 Missing ⚠️
... and 33 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2392      +/-   ##
==========================================
- Coverage   71.11%   66.78%   -4.34%     
==========================================
  Files         127      146      +19     
  Lines       28517    30279    +1762     
==========================================
- Hits        20280    20221      -59     
- Misses       8237    10058    +1821     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iphydf iphydf marked this pull request as ready for review December 4, 2023 17:36
@iphydf iphydf force-pushed the ordered-events branch 3 times, most recently from ae9a535 to a230308 Compare December 9, 2023 12:15
@iphydf iphydf force-pushed the ordered-events branch 4 times, most recently from 7fcb96b to 2949e45 Compare December 20, 2023 14:42
@Green-Sky Green-Sky mentioned this pull request Dec 25, 2023
@iphydf iphydf force-pushed the ordered-events branch 4 times, most recently from 8052d22 to a589366 Compare December 29, 2023 00:07
@iphydf iphydf force-pushed the ordered-events branch 12 times, most recently from 9681dc9 to db7ce08 Compare January 10, 2024 23:32

@Green-Sky Green-Sky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

been running the code in multiple revisions since april last year.

@iphydf iphydf force-pushed the ordered-events branch 2 times, most recently from 60a42a0 to 17a9865 Compare January 11, 2024 13:47
iphydf and others added 3 commits January 15, 2024 16:32
These are quite expensive, because they go through all events to index
in a typed array that no longer exists. Clients should index in the
union array and find the event they want themselves, or use dispatch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants