-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Qute: bunch of performance improvements
- optimize section nodes (collapse text nodes) - reduce the overhead for CompletableFuture.all() - cache value resolver for each part of an expression
- Loading branch information
Showing
12 changed files
with
195 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 20 additions & 4 deletions
24
independent-projects/qute/core/src/main/java/io/quarkus/qute/ParameterDeclarationNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,34 @@ | ||
package io.quarkus.qute; | ||
|
||
import java.util.function.Consumer; | ||
import java.util.concurrent.CompletionStage; | ||
|
||
/** | ||
* Template parameter declaration. | ||
* <p> | ||
* This node is only used when removing standalone lines. | ||
*/ | ||
public class ParameterDeclarationNode extends TextNode { | ||
public class ParameterDeclarationNode implements TemplateNode { | ||
|
||
private final String value; | ||
private final Origin origin; | ||
|
||
public ParameterDeclarationNode(String value, Origin origin) { | ||
super(value, origin); | ||
this.value = value; | ||
this.origin = origin; | ||
} | ||
|
||
@Override | ||
public CompletionStage<ResultNode> resolve(ResolutionContext context) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public void process(Consumer<String> consumer) { | ||
public Origin getOrigin() { | ||
return origin; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.