-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Android] Remove JNI code in each cluster. #30141
[Android] Remove JNI code in each cluster. #30141
Conversation
… remove_jni_data_model
PR #30141: Size comparison from 0d36dcf to 9502189 Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate a little bit more regarding " there doesn't have chipdevicecontroller object in chipclusters class." so that you cannot use existing generic IM Java API?
scripts/py_matter_idl/matter_idl/generators/java/ChipClusters_java.jinja
Show resolved
Hide resolved
scripts/py_matter_idl/matter_idl/generators/java/ChipClusters_java.jinja
Show resolved
Hide resolved
scripts/py_matter_idl/matter_idl/generators/java/ChipClusters_java.jinja
Show resolved
Hide resolved
Based on what we've discussed, I understand that the next step is to refactor the BaseCHIPCluster, Java DeviceController and Kotlin DeviceController to utilize a shared IM JNI implementation. If I've understood correctly, we should consider a different naming convention rather than BaseCHIPCluster-JNI.cpp, since the Cluster API is actually built upon the DeviceController API. |
@yunhanw-google |
… remove_jni_data_model
PR #30141: Size comparison from eb2f8f6 to 74641f0 Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #30141: Size comparison from eb2f8f6 to cc44387 Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
The ChipDeviceController instance is not directly accessible within the ChipClusters class in Java; we have access only to the native ChipDeviceController handle. Therefore, it seems the most viable approach at the moment is to continue utilizing the JNI for these APIs. |
scripts/py_matter_idl/matter_idl/generators/java/ChipClusters_java.jinja
Show resolved
Hide resolved
… remove_jni_data_model
PR #30141: Size comparison from f72c875 to 89ccc68 Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
Fix #29572
To solve the library capacity problem and simplify the code expression, I implemented the following.
Library Capacity Change :
Before :
2,123,501 : CHIPController.jar
540,154,776 : libCHIPController.so
After
5,418,244 CHIPController.jar
75,295,832 : libCHIPController.so