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

Improve performance with intelligent allocations #6

Open
Ceiridge opened this issue Nov 30, 2022 · 2 comments
Open

Improve performance with intelligent allocations #6

Ceiridge opened this issue Nov 30, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Ceiridge
Copy link
Owner

Ceiridge commented Nov 30, 2022

Performance can be improved by dynamically allocating a rather big block/amount of sectors while a file is being written to.
Once the file is fully written, the spare sectors can be deallocated.
This is similar to ArrayLists, in most cases without the disadvantage of wasting memory.
Also, the sectors can be of dynamic size by storing a pointer to the next sector directly next to the data.

@Ceiridge Ceiridge added the enhancement New feature or request label Nov 30, 2022
@Ceiridge
Copy link
Owner Author

Ceiridge commented Jan 1, 2023

Before the file is written to, the new file size is already known and it is already allocated accordingly.
Also, dynamic sizes would in total decrease performance even more, because random access would not be possible and sizes would have to be stored.

@Ceiridge Ceiridge closed this as completed Jan 1, 2023
@Ceiridge
Copy link
Owner Author

Ceiridge commented Jan 9, 2023

This could work with search trees. Further research is needed

@Ceiridge Ceiridge reopened this Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant