Skip to content

AoT optimization: trim out unused code#200

Merged
Karolina-Bogacka merged 1 commit intomainfrom
GH-195/graal-substitutes
Aug 24, 2025
Merged

AoT optimization: trim out unused code#200
Karolina-Bogacka merged 1 commit intomainfrom
GH-195/graal-substitutes

Conversation

@Ostrzyciel
Copy link
Member

@Ostrzyciel Ostrzyciel commented Aug 24, 2025

Issue #195

Introduces compile-time substitutions that make it impossible for the program to reach code that is not really used in jelly-cli, but still bloats the binary size.

Notably, this excludes all HTTP and SSL code used by JSON-LD context resolvers (we don't have to support that...) and Jena SPARQL (this is not used at all). We also trim out unused cyphers, which were included due to Jena using UUIDs for blank nodes.

This reduces the binary size by a further 10MB:

$ ls -lh
-rwxrwxr-x 1 piotr piotr  44M Aug 24 23:11 jelly-cli-skipflow
-rwxrwxr-x 1 piotr piotr  34M Aug 24 23:42 jelly-cli-skipflow-substitutes

Baseline throughput:

$ time ./jelly-cli-skipflow rdf transcode nanopubs.jelly > /dev/null

real    1m56,017s
user    1m47,645s
sys     0m8,306s

With this change applied:

$ time ./jelly-cli-skipflow-substitutes rdf transcode nanopubs.jelly > /dev/null

real    1m56,843s
user    1m48,597s
sys     0m8,226s

So, throughput is basically the same.

@Karolina-Bogacka Karolina-Bogacka merged commit 30e3c46 into main Aug 24, 2025
7 checks passed
@Karolina-Bogacka Karolina-Bogacka deleted the GH-195/graal-substitutes branch August 24, 2025 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants