Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Large files not usable #76

Closed
DanBennettUK opened this issue May 25, 2016 · 2 comments
Closed

Large files not usable #76

DanBennettUK opened this issue May 25, 2016 · 2 comments
Labels

Comments

@DanBennettUK
Copy link

I have a file that is 678KB (>94,000 words)...

Takes a while to load and when in use, typing is incredibly slow - can take a long time for text to appear.

@brrd brrd added the bug label May 25, 2016
@brrd
Copy link
Owner

brrd commented May 29, 2016

I did some tests with a 1MB document and found out that latency comes from several methods:

Method Load doc Edit doc Move cursor
abrPane.updateToc 13426.697ms 1501.992ms -
abrPane.spyCursor 4.445ms 3.172ms -
abrDoc.autopreview 338.541ms 158.882ms 240.584ms

abrPane.updateToc and abrPane.spyCursor should be run in a background thread.

Additionally we can improve a bit performances by modifying abrDoc.autopreview:

  • When editing, only process edited lines.
  • When moving cursor/selection, only process previously selected lines + currently selected lines. On selection, also wait for the mouse button to be released to run the function.

brrd added a commit that referenced this issue May 30, 2016
See issue #76.

Improve performances when editing big documents by running most of abr-pane functions in a background thread. However DOM operations (jquery) must remain in 
the main thread so this may still be improved.
brrd added a commit that referenced this issue May 30, 2016
**This commit is the good version of a duplicate (my mistake).**

See issue #76.

Improve performances when editing big documents by running most of abr-pane functions in a background thread. However DOM operations (jquery) must remain in
the main thread so this may still be improved.
brrd added a commit that referenced this issue May 30, 2016
In order to improve performances, process a line only when it is rendered by 
CodeMirror (rather than the whole document each time a line is rendered). 
`autopreviewQueue` is introduced in order to keep a track of such lines. 
Related to #76.
brrd referenced this issue May 31, 2016
…revious call

So simple-virtual-dom is only called when it is relevant
@brrd
Copy link
Owner

brrd commented May 31, 2016

I fixed this on develop branch so this will be working in the next release.

@brrd brrd closed this as completed Jul 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants