Skip to content

Conversation

@sergiogarciadev
Copy link

This is a big change, take extra care when testing.

This PR refactor file access to use Memory Mapped IO, which let us handle file access like if the entire file was on memory. Actual read from disk occurs each time we access a page for the first time, make it very easy to the programmer as it doesn't need to calculation to check if a page is cached or problems like rendering page between cache boundaries, enabling smoother transition between pages.

As cache is now handled by the OS, pages can be dynamic calculated to use all the available terminal size.

This PR should fix #4 and #5, it will also makes fixing #9 easier.

It also should fixes #10 , but I think there is room for improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text view does not show the entire file contents Cache scheme

1 participant