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

Implement Bulk Loading/Writing for Chunks #535

Draft
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

Mili-ssm
Copy link
Contributor

@Mili-ssm Mili-ssm commented Feb 9, 2025

This PR implement the Bulk API for chunks loading/writing with some function changes that get leverage of the bulk operation (like reducing allocations, locks and more).

Also this includes some Anvil refactor and the creation of a Traits/API that can be re-used on entity storage system and to implements diferents Writers/Loaders (as DB cached, one that use in Cloud Storage or more optimizations).

Mili and others added 30 commits January 24, 2025 21:56
…ment and use exception to know if file exist
pub enum Compression {
/// GZip Compression
GZip = 1,
/// ZLib Compression
ZLib = 2,
/// Uncompressed (since a version before 1.15.1)
#[default]
Uncompressed = 3,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this, We had this before already. But it actually makes no sense to have "No Compression" in an Compression enum, Also now we have to use convert the input data to vec when uncompressed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no problem to let it as before but, if the code 3exists and means something specific, even documented officially (https://minecraft.wiki/w/Region_file_format). Dont we should have it well represented on code? this way we dont need to manage where we use the compression struct. And also NoCompression can be a "zero runtime cost but no memory footprint improve version". Whatever you choose its good for me, i just thought it was desirable.

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.

2 participants