hiero-ledger / hiero-ledger/hiero-consensus-node

Lazy load Hints and Wrap native libraries

Open
#24,693 2 comments 0 reactions 1 assignee Claimed by @TRIVENI206 View on GitHub
Feature Enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.