• 0.0.28

hone:optimize

Full name:

org.eolang:hone-maven-plugin:0.0.28:optimize

Description:

Converts Bytecode to Bytecode in order to make it faster.

This goal takes every .class file from the target/classes/ directory, converts it to .xmir format (which is XML representation of EO), then converts .xmir to .phi (which is 𝜑-calculus), then optimizes it via eo-phi-normalizer, and then back to .xmir and to .class. As a result, you obtain optimized Bytecode in the target/classes/ directory, which supposedly works faster than before.

The entire optimization pipeline happens inside Docker container, which is run from the image specified in the image parameter. The image may either be pulled or built locally. We recommend pulling it from the Docker Hub with the help of the pull goal. Also, we recommend deleting the image after optimization is done, with the help of the rmi goal.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Since version: 0.1.0.
  • Binds by default to the lifecycle phase: process-classes.

Optional Parameters

Name Type Since Description
<cache> File - EO cache directory.
User Property: hone.cache
<eoVersion> String 0.1.0 EO version to use.
User Property: hone.eo-version
<extra> List<String> 0.1.0 List of extra rules to use for optimizations, provided as YAML files.
User Property: hone.extra
<image> String 0.1.0 Docker image to use.
Default: yegor256/hone:latest
User Property: hone.image
<jeoVersion> String 0.1.0 JEO version to use.
User Property: hone.jeo-version
<rules> String 0.1.0 List of rules to use for optimizations.

For example, "simple,b*,!abc" would include the simple rule, all rules that start with the b character, and exclude the abc rule.


Default: *
User Property: hone.rules
<skip> boolean 0.1.0 Skip the execution, if set to TRUE.
Default: false
User Property: hone.skip
<sudo> boolean 0.1.0 Use "sudo" for "docker".
Default: false
User Property: hone.sudo
<target> File 0.1.0 The "target/" directory of Maven project.
Default: ${project.build.directory}
User Property: hone.target

Parameter Details

<cache>

EO cache directory.
  • Type: java.io.File
  • Required: No
  • User Property: hone.cache

<eoVersion>

EO version to use.
  • Type: java.lang.String
  • Since: 0.1.0
  • Required: No
  • User Property: hone.eo-version

<extra>

List of extra rules to use for optimizations, provided as YAML files.
  • Type: java.util.List<java.lang.String>
  • Since: 0.1.0
  • Required: No
  • User Property: hone.extra

<image>

Docker image to use.
  • Type: java.lang.String
  • Since: 0.1.0
  • Required: No
  • User Property: hone.image
  • Default: yegor256/hone:latest

<jeoVersion>

JEO version to use.
  • Type: java.lang.String
  • Since: 0.1.0
  • Required: No
  • User Property: hone.jeo-version

<rules>

List of rules to use for optimizations.

For example, "simple,b*,!abc" would include the simple rule, all rules that start with the b character, and exclude the abc rule.

  • Type: java.lang.String
  • Since: 0.1.0
  • Required: No
  • User Property: hone.rules
  • Default: *

<skip>

Skip the execution, if set to TRUE.
  • Type: boolean
  • Since: 0.1.0
  • Required: No
  • User Property: hone.skip
  • Default: false

<sudo>

Use "sudo" for "docker".
  • Type: boolean
  • Since: 0.1.0
  • Required: No
  • User Property: hone.sudo
  • Default: false

<target>

The "target/" directory of Maven project.
  • Type: java.io.File
  • Since: 0.1.0
  • Required: No
  • User Property: hone.target
  • Default: ${project.build.directory}