Skip to content

Allow lazy-loading of data #29

@ProgramMax

Description

@ProgramMax

Rather than keep all of the file's data in memory, we can know the total file length and have unloaded Buffers in the BufferChain.

These buffers know their offset into the file and their size. So as the user scrolls down we can begin loading. This allows us to page buffers in and out of memory, keeping memory utilization low.

Additionally, as the user edits the file this can reference the shadow file mentioned in #26. So the Buffer class needs to know which file it references. (Or maybe it should always reference the shadow file? Should the shadow file only contain diffs from the original file?)

For this to work, we need something like a callback or a promise to let us know once the data is loaded.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions