Latency and execution speed “debounce mechanism”

What determines the speed of error detection in WProofreader?

The speed at which WProofreader highlights grammar and spelling mistakes is influenced by the way text input is processed and the user's browser capabilities. Here's a detailed breakdown:

Sentence definition: A sentence is any text string ending with a punctuation mark such as period, exclamation mark, question mark (.!?) or a line break (/n), followed by a space and either a capitalized word or the end of a paragraph.

Request timing:

  • Immediate: Requests are sent to the server instantly after a sentence ends with a punctuation mark (.!?) followed by a space.

  • Delayed: If typing stops, requests are sent after a 500 ms pause.

What is the debounce mechanism?

The debounce mechanism is designed to manage the timing of requests to optimize performance without overloading the application server:

  • For extensive edits (modifications covering more than one paragraph), there’s a 2000 ms delay before a request is sent.

  • For minor edits, a delay of 500 ms is applied.

  • For completed sentences (ending with a punctuation mark and space), there is no delay.

Factors affecting response time:

Response time is affected by factors such as the length of text, language, number of errors, and the type of check (e.g., spelling, grammar, style).

The debounce mechanism, featuring fixed delays of 500 ms for minor changes and 2000 ms for extensive edits, ensures efficient processing and timely feedback, taking into account the user's browser and server capacity.

Last updated

Was this helpful?