-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add support for Fast FAP loading #89
Comments
Looking at the PR, I think what it's doing is creating a hash table for symbol lookup, rather than a linear search. This might need to be done as some sort of post-processing step as I don't think it's possible to do this in |
Yep, fastfap.py is post-processing elf files not only for hashing (also, this does not affect the speed, it is size optimization), but also to create an optimized relocation structure for our elf loader. This removes a large number of calls to the storage, and that's how such an acceleration is achieved. Instead of "Each offset in .rel refers to .sym, then .sym refers to .symstr, and then we get a hash for the string from .symstr and then we apply this single relocation" we now have ".fast.rel, which contains a hash of the function name and offset, where this relocation needs to be applied”. I recommend you to wait until this feature is released because the format of these sections is subject to change. I also left a fallback to the old usual linking process if optimized sections is not present. |
@DrZlo13 Thanks for the information. Definitely appreciate the fallback, so this isn't an urgent thing to address. |
This was released in firmware version 0.86.1, and once #93 merges we will require at least 0.87.0, so we can start working on this. |
This is now implemented in #99. I think I got the encodings right, and it appears to work ( |
@str4d MD5 there is only for reducing filename size. Not all filesystems can handle files named from a C++ generated section name. |
@DrZlo13 thanks, that clarifies things ( I expect that means my current PR is adopting section names from the random file name being chosen by |
flipperdevices/flipperzero-firmware#2790 bumps the SDK to 31 with 15x faster loading of FAP files. It requires adding
.fast.rel
sections, so we will need to alterflipperzero-rt
to enable it.The text was updated successfully, but these errors were encountered: