Skip to content

Increasing lag when moving by units other than character towards the bottom of large text documents in virtual buffers #155

@nvaccessAuto

Description

@nvaccessAuto

Reported by jteh on 2008-08-11 05:02
When reading a large plain text document in a virtual buffer, NVDA becomes increasingly laggy when moving by units other than character (line, word, etc.) towards the bottom of the document. If the document is large enough, this lag is quite noticeable and unacceptable at the end of the document.

Steps to Reproduce

  1. Open http://bazaar-vcs.org/bzr/bzr.dev/NEWS in Mozilla Firefox 3 and ensure that the document has focus.
  2. Press ctrl+end to move to the end of the document.
  3. Use the left and right arrows to navigate by character a few times. Observe that response is instantaneous.
  4. Use the up and down arrows to navigate by line a few times.

Actual Results

When navigating by line, response is severely sluggish.

Expected Results

The response when navigating by line should be virtually instantaneous as it is when navigating by character.

Additional Notes

  • A plain text document appears as one big node containing all of the text, regardless of its size. This is why this lag occurs for text documents.
  • The lag is caused by VBufStorage_getBufferLineOffsets scanning for possible line breaks from the start of the node (hardStart). Thus, the delay will increase in proportion to the position's distance from the start.
  • This can be fixed by searching in both directions for linefeed characters and further limiting the search to linefeed boundaries; i.e. setting hardStart and hardEnd to the previous and next linefeed, respectively.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions