Skip to content

Commit 74ef866

Browse files
committed
Performance improvement
1 parent 55500d0 commit 74ef866

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 2.5.1
2+
* Various performance improvements
3+
* Updated dependencies
4+
15
# 2.5.0
26
* New module `caching-validation-provider`
37

vaadin/src/main/java/software/xdev/sse/vaadin/xhrreload/XHRReloadVaadinServiceInitListener.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.util.Optional;
2222
import java.util.regex.Pattern;
2323

24+
import org.jsoup.nodes.DataNode;
2425
import org.jsoup.nodes.Document;
2526
import org.jsoup.nodes.Element;
2627
import org.slf4j.Logger;
@@ -65,7 +66,8 @@ public XHRReloadVaadinServiceInitListener(final XHRReloadConfig config)
6566

6667
this.scriptElement = new Element("script")
6768
.attr("type", "text/javascript")
68-
.html(scriptContents);
69+
// This is effectively the same as .html() but a lot faster because no HTML paring is done
70+
.appendChild(new DataNode(scriptContents));
6971
LOG.trace("Built scriptElement: {}", this.scriptElement);
7072
}
7173
catch(final IOException e)

0 commit comments

Comments
 (0)