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

fixed stroke generation #32

Merged
merged 1 commit into from
May 7, 2024

Conversation

Aaronontheweb
Copy link
Member

No description provided.

Copy link
Member Author

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

Detailed my changes

@@ -48,7 +48,7 @@ private PublishActivity()

public DrawingSessionActor(string sessionId, IRequiredActor<AllDrawingsPublisherActor> drawingActivityPublisher)
{
PersistenceId = sessionId;
PersistenceId = $"drawsession-{sessionId}";
Copy link
Member Author

Choose a reason for hiding this comment

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

Make persistence ids more obvious from looking at the database

public UserId UserId { get; } = userId;
}

public sealed class CreateConnectedStroke(DrawingSessionId drawingSessionId, UserId userId, ConnectedStroke connectedStroke)
Copy link
Member Author

Choose a reason for hiding this comment

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

Don't have the Blazor UI decide how or when to group strokes - have the debouncer do it.

@@ -78,21 +78,24 @@ else
// create subscription
async Task RunSubscription()
{
var source = Source.ActorRef<DrawingActivityUpdate>(100, OverflowStrategy.DropHead);
var source = Source.ActorRef<List<DrawingActivityUpdate>>(100, OverflowStrategy.DropHead);
Copy link
Member Author

Choose a reason for hiding this comment

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

Fix bug with streaming updates on sessions

.PreMaterialize(_materializer);

_debouncer = sourceRef;
source.GroupedWithin(100, TimeSpan.FromMilliseconds(75))
source.GroupedWithin(10, TimeSpan.FromMilliseconds(75))
Copy link
Member Author

Choose a reason for hiding this comment

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

Reduce the size of stroke chunks

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) May 7, 2024 08:26
@Aaronontheweb Aaronontheweb merged commit 96850fe into petabridge:dev May 7, 2024
2 checks passed
@Aaronontheweb Aaronontheweb deleted the fix-stroke-drawing branch May 7, 2024 08:42
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.

1 participant