diff --git a/src/main/java/org/eolang/jeo/representation/XmirRepresentation.java b/src/main/java/org/eolang/jeo/representation/XmirRepresentation.java index b5e650fb2..a3ca212da 100644 --- a/src/main/java/org/eolang/jeo/representation/XmirRepresentation.java +++ b/src/main/java/org/eolang/jeo/representation/XmirRepresentation.java @@ -210,7 +210,13 @@ private static Node open(final Path path) { /** * Optimized schema for XMIR. + * It is an optimized version of {@link org.eolang.parser.Schema} class. * @since 0.6 + * @todo #889:30min Use the `Schema` class instead of `OptimizedSchema`. + * The `OptimizedSchema` class is a temporary solution to avoid the performance + * issues with the `Schema` class. We will be able to remove this class after + * the following issue is resolved: + * https://github.com/jcabi/jcabi-xml/issues/277 */ private static class OptimizedSchema { /** diff --git a/src/main/java/org/eolang/jeo/representation/xmir/XmlNode.java b/src/main/java/org/eolang/jeo/representation/xmir/XmlNode.java index db3570ef0..2ce640f66 100644 --- a/src/main/java/org/eolang/jeo/representation/xmir/XmlNode.java +++ b/src/main/java/org/eolang/jeo/representation/xmir/XmlNode.java @@ -43,7 +43,13 @@ public final class XmlNode { /** - * Parent node. + * XML node. + * Attention! + * Here we use the {@link Node} class instead of the {@link com.jcabi.xml.XML} + * by performance reasons. + * In some cases {@link Node} 10 times faster than {@link com.jcabi.xml.XML}. + * You can read more about it here: + * Optimization */ private final Node node; @@ -57,7 +63,7 @@ public XmlNode(final String xml) { /** * Constructor. - * @param parent Parent node. + * @param parent Xml node. */ public XmlNode(final Node parent) { this.node = parent; diff --git a/src/main/java/org/eolang/jeo/representation/xmir/XmlProgram.java b/src/main/java/org/eolang/jeo/representation/xmir/XmlProgram.java index b14858596..30afab904 100644 --- a/src/main/java/org/eolang/jeo/representation/xmir/XmlProgram.java +++ b/src/main/java/org/eolang/jeo/representation/xmir/XmlProgram.java @@ -43,6 +43,11 @@ public final class XmlProgram { /** * Root node. + * Here we use the {@link Node} class instead of the {@link com.jcabi.xml.XML} + * by performance reasons. + * In some cases {@link Node} 10 times faster than {@link com.jcabi.xml.XML}. + * You can read more about it here: + * Optimization */ private final Node root; diff --git a/src/test/java/org/eolang/jeo/representation/XmirRepresentationTest.java b/src/test/java/org/eolang/jeo/representation/XmirRepresentationTest.java index 89a5bcd07..a9ce9d879 100644 --- a/src/test/java/org/eolang/jeo/representation/XmirRepresentationTest.java +++ b/src/test/java/org/eolang/jeo/representation/XmirRepresentationTest.java @@ -161,9 +161,6 @@ void failsToOpenBrokenXmirRepresentationFromFile(@TempDir final Path dir) throws * This is a performance test, which is disabled by default. * It is used to measure the performance of the conversion of the EO object * into the bytecode representation and back. - * 1) Timings before the optimization were: 21s, 23s, 21s, 21s (500 attempts) - * 2) `XMLDocument` -> `org.w3c.Node` optimization: 11s, 10s, 11s, 10s (500 attempts) - * 3) Remove `XMLDocument` usage: 10s, 9s, 9s, 9s (500 attempts) */ @Test @Disabled