Skip to content

SharedWorker refactor #471

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

SharedWorker refactor #471

wants to merge 1 commit into from

Conversation

parfeon
Copy link
Contributor

@parfeon parfeon commented Aug 6, 2025

refactor(shared-worker): reorganize SharedWorker code

Decouple and re-organize SharedWorker code for better maintainability.

perf(shared-worker): improved subscription state refresh logic

Additional query parameter (removed before sending) is added for requests triggered by user and state will be updated only for these requests.

refactor(logger): avoid similar timestamp in sequential lines

Log entry timestamp will be altered on millisecond if multiple log entries have similar timestamp (logged in fraction of nanoseconds).

Decouple and re-organize `SharedWorker` code for better maintainability.

perf(shared-worker): improved subscription state refresh logic

Additional query parameter (removed before sending) is added for requests triggered by user and
state will be updated only for these requests.

refactor(logger): avoid similar timestamp in sequential lines

Log entry timestamp will be altered on millisecond if multiple log entries have similar
timestamp (logged in fraction of nanoseconds).
@parfeon parfeon self-assigned this Aug 6, 2025
@parfeon parfeon added priority: medium This PR should be reviewed after all high priority PRs. type: refactor This PR contains refactored existing features. labels Aug 6, 2025
@pubnub-ops-terraform
Copy link

pubnub-ops-terraform commented Aug 6, 2025

Snyk checks have failed. 1 issues have been found so far.

Icon Severity Issues
Critical 1
High 0
Medium 0
Low 0

security/snyk check is complete. 1 issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

if (channelGroups) channelGroups = channelGroups.filter((channelGroup) => !channelGroup.endsWith('-pnpres'));
if (channels) channels = channels.filter((channel) => !channel.endsWith('-pnpres'));
}
if (channelGroups) channelGroups = channelGroups.filter((channelGroup) => !channelGroup.endsWith('-pnpres'));
Copy link
Contributor

Choose a reason for hiding this comment

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

will this be applicable to ee and non ee case both cases? OR it's just for getSubscribedChannels/Groups method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This used for REST API call itself. Function used by: SubscriptionManager, PresenceEventEngine and EventEngine (when presence interval not set).

@mohitpubnub
Copy link
Contributor

with latest build test running 2 hours, looks fine

@mohitpubnub
Copy link
Contributor

@parfeon can we have this change in this PR to have changes consolidated to one PR

@parfeon
Copy link
Contributor Author

parfeon commented Aug 7, 2025

@mohitpubnub sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium This PR should be reviewed after all high priority PRs. type: refactor This PR contains refactored existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants