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

Config API: Speed up class path Scan for records

Open
#6,293 0 comments 0 reactions 1 assignee Claimed by @hendrikebbers View on GitHub
Base Config Platform
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

In https://github.com/hashgraph/hedera-services/pull/6274 @david-bakin-sl mentioned some interesting points how we can speed up the classpath / modulepath scan:

> There are more available scan filters in classgraph - I wonder if any of them would be useful to speed the scan. In particular I'm looking at .acceptModules and .acceptClasspathElementsContainingResourcePath(paths).
> For the first - since there's a module-info.class file in each jar I would guess that would make skipping jars much faster than looking inside to see the project paths.
> For the second - we could consider placing a resource with known path inside of every jar that has config elements. It's a bit of an overhead for the developer, but after all, most such would have a bootstrap.properties anyway. (At least in the current config system.) That filter too could speed rejection of completely inappropriate jars.

Next to that I discussed with @cody-littley that it might make sense to cache results for future tests when it is used for the `TestConfigBuilder`.

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.