We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
大神求解: mAppDelegateList = ClassUtils.getObjectsWithInterface(this, IApplicationDelegate.class, ROOT_PACKAGE); 这里查找对应包下面所有的类 进行遍历如果app的类过多是不是会耗性能呢?
因为代理类一般一个模块只有一个类你这边取名低MyDelegate 可否根据配置文件拿到主工程依赖的子模块名称 然后直接去找到对应的 package.model.MyDelegate呢?
The text was updated successfully, but these errors were encountered:
09-27 18:09:12.369 11253-11253/? E/耗时=45毫秒 09-27 18:09:12.369 11253-11253/? E/耗时=0毫秒
上面那行是你这个全局遍历的耗时 你这个项目工程不大 类不多 大型APP要是类很多 这个时间应该会多很多
下面那个是直接通过配置获取到对应模块下面的MyDelegate基本没有时间损耗
Sorry, something went wrong.
用字节码注入的方式可以解决问题
No branches or pull requests
大神求解:
mAppDelegateList = ClassUtils.getObjectsWithInterface(this, IApplicationDelegate.class, ROOT_PACKAGE);
这里查找对应包下面所有的类 进行遍历如果app的类过多是不是会耗性能呢?
因为代理类一般一个模块只有一个类你这边取名低MyDelegate
可否根据配置文件拿到主工程依赖的子模块名称 然后直接去找到对应的 package.model.MyDelegate呢?
The text was updated successfully, but these errors were encountered: