Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete file loading via mmap #47

Merged
merged 1 commit into from
Aug 14, 2023
Merged

Delete file loading via mmap #47

merged 1 commit into from
Aug 14, 2023

Conversation

werediver
Copy link
Owner

Delete file loading via mmap(), because mmap() doesn't seem to provide any benefits for the use-cases of this project.

Some of the arguments:

  • Majority of Dart source files I could check (including Flutter SDK and a large mobile app project) are under 4 KiB in size, which means even mmap() would just load them completely on the first access
  • Optimizing for the "good weather" scenario (a successful parse), UTF-8 validation of the source text should be done for the entire file (and preferably in one go, because the validation code doesn't seem very compact, so interleaving it with other complicated routines may just cause inefficient execution)

because mmap doesn't seem to provide any benefits for the use-cases of this project
@werediver werediver merged commit 829af84 into main Aug 14, 2023
1 check passed
@werediver werediver deleted the del_mmap branch August 14, 2023 17:44
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.

1 participant