share / share/sharedb

increase delay before flush from client?

Open
#185 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
JavaScript
Stars
6.5k
Forks
456
Avg merge
1d 5h
Merged PRs (30d)
5

Description

Hey!

I'm learning the codebase, and I was wondering... right now the flush method on the client is called on process.nextTick, which adds a small delay, so that multiple synchronous operations can be composed together before being sent to the server.

Is there any harm in increasing this delay? For example what if it was 100ms instead? I'm thinking for the case of someone typing in a rich text editor—that slightly longer delay might 2–5x the composition rate when someone is typing quickly (or backspacing quickly).

Anyone know if this is viable?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the client's flush method and trace how process.nextTick batches synchronous operations before sending them to the server. Compare that behavior with a 100ms delay for typing and backspacing workloads, and define completion as a measured, tested decision about batching and responsiveness.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.