-
Notifications
You must be signed in to change notification settings - Fork 653
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
how to config redex pass #727
Comments
Hi, the aggressive.config is a good starting point. Please let us know if run into issues with that. We do plan to keep the config information more updated in the future. |
Running RemoveEmptyClassesPass... If I get a log like the one above, I can delete the pass RemoveEmptyClassesPass right? The other question is, what is the basis for removing or adding pass. |
It seems like it doesn't do much but it could be input dependent. It might find empty classes to remove for some other inputs. You don't necessarily have to prune passes even if they don't seem to do much for now. It's not taking much time to run anyways, it seems. You can always add other passes to the |
How do I see what a pass does? What are the criteria for whether a pass is valuable? |
As you said, default.config is a way to make sure that every pass works, aggressive.config is a good place to start. What should I choose if I want to have a pass configuration that is universal and works for different inputs? Please answer my confusion. My requirement is to have a common pass configuration to optimize different APKs. I would also like to know the criteria to measure the effectiveness of each pass optimization, as well as the overall config optimization. After all, the optimization of redex tool is determined by configuring pass. Do you agree with me? |
When used aggressive.config, the following error occurs File "/tmp/redex.TGskxX/redex.py", line 956, in prepare_redex During handling of the above exception, another exception occurred: Traceback (most recent call last): aggressive.config is as follows: |
@thezhangwei hi~Can you answer my questions above? |
We have docs for the passes: https://github.com/facebook/redex/blob/main/docs/passes.md |
Summary: Fix the invalid json. github issue: #727 Reviewed By: ssj933 Differential Revision: D40875833 fbshipit-source-id: b8139977df4ab23704793e7258f83a9566b0cfde
The json error was fixed in 52e44ae. |
In general, most passes work towards reducing the final size. Some passes don't do all of the cleanup work and would require a RemoveUnreachablePass to run after to actually remove newly unreachable classes/methods/fields. Some passes are geared towards improving performance while regressing size, e.g. PerfMethodInlinePass. Some passes are necessary to produce valid dexes, e.g. InterDexPass and RegAllocPass. |
How to configure a set of universal pass refers to the good optimization effect that can be achieved by using this set of pass Settings for different apps, how to know and avoid the potential risks of each pass, and what are the standards for measuring the optimization effect.
The text was updated successfully, but these errors were encountered: