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

Memory map class format #1

Open
Caellian opened this issue Oct 30, 2023 · 0 comments
Open

Memory map class format #1

Caellian opened this issue Oct 30, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Caellian
Copy link
Owner

Given that it's unlikely this crate will ever need to generate class files. A very nice optimization that's possible is memory mapping the class file. This would essentially remove all branches that occur while reading class files. I got the idea from harfbuzz and fontations.

This choice does however make writing either complicated by requiring the use of a builder pattern, or slow by requiring explicit memory moves every write operation.

Largest scope of this project includes modification of the class files to allow diff-patching their bytecode though this is unlikely to be implemented in foreseeable future.

This is also not a priority until decompilation is on par with other decompilers. Current class file reading performance isn't the worst.

Fontations are a good example of how to do this. Ideally this feature should be implemented alongside a specification parser to ensure parsing code matches the spec exactly.

@Caellian Caellian added the enhancement New feature or request label Oct 30, 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