hiero-ledger / hiero-ledger/hiero-consensus-node
Lazy load Hints and Wrap native libraries
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
For the solo memory reduction effort, we've identified that the hedera-app library eagerly loads the Hints and Wraps native libraries regardless of feature flag value. I would expect if `tss.hintsEnabled=false` or `tss.wrapsEnabled=false` then the libraries would not be loaded. However, since both libraries are loaded in static fields they get loaded eagerly. Lazy loading would allow the MN to exclude this library entirely since we don't use it for our APIs. Excluding it would reduce our image size, improve startup time, and reduce overall memory.
```java
private static final HintsLibraryBridge HINTS = HintsLibraryBridge.getInstance();
private static final WRAPSLibraryBridge WRAPS = WRAPSLibraryBridge.getInstance();
```
Contributor guide
Assessment
This issue has not been assessed yet.