Commit 285092a 1 parent c1c74ea commit 285092a Copy full SHA for 285092a
File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use test::Bencher;
4
4
fn leptos_ssr_bench ( b : & mut Bencher ) {
5
5
b. iter ( || {
6
6
use leptos:: * ;
7
-
7
+ HydrationCtx :: reset_id ( ) ;
8
8
_ = create_scope ( create_runtime ( ) , |cx| {
9
9
#[ component]
10
10
fn Counter ( cx : Scope , initial : i32 ) -> impl IntoView {
@@ -32,12 +32,11 @@ fn leptos_ssr_bench(b: &mut Bencher) {
32
32
33
33
assert_eq ! (
34
34
rendered,
35
- "<main><h1>Welcome to our benchmark page.</h1><p>Here's some introductory text.</p><div><button>-1</button><span>Value: <!>1<template id=\" _3\" ></template>!</span><button>+1</button></div><template id=\" _1\" ></template><div><button>-1</button><span>Value: <!>2<template id=\" _2\" ></template>!</span><button>+1</button></div><template id=\" _0\" ></template><div><button>-1</button><span>Value: <!>3<template id=\" _2\" ></template>!</span><button>+1</button></div><template id=\" _0\" ></template></main>"
36
- ) ;
35
+ "<main id=\" _0-1\" ><h1 id=\" _0-2\" >Welcome to our benchmark page.</h1><p id=\" _0-3\" >Here's some introductory text.</p><div id=\" _0-3-1\" ><button id=\" _0-3-2\" >-1</button><span id=\" _0-3-3\" >Value: <!>1<!--hk=_0-3-4-->!</span><button id=\" _0-3-5\" >+1</button></div><!--hk=_0-3-0--><div id=\" _0-3-5-1\" ><button id=\" _0-3-5-2\" >-1</button><span id=\" _0-3-5-3\" >Value: <!>2<!--hk=_0-3-5-4-->!</span><button id=\" _0-3-5-5\" >+1</button></div><!--hk=_0-3-5-0--><div id=\" _0-3-5-5-1\" ><button id=\" _0-3-5-5-2\" >-1</button><span id=\" _0-3-5-5-3\" >Value: <!>3<!--hk=_0-3-5-5-4-->!</span><button id=\" _0-3-5-5-5\" >+1</button></div><!--hk=_0-3-5-5-0--></main>" ) ;
37
36
} ) ;
38
37
} ) ;
39
38
}
40
- /*
39
+
41
40
#[ bench]
42
41
fn tera_ssr_bench ( b : & mut Bencher ) {
43
42
use tera:: * ;
@@ -194,4 +193,3 @@ fn yew_ssr_bench(b: &mut Bencher) {
194
193
} ) ;
195
194
} ) ;
196
195
}
197
- */
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ fn yew_todomvc_ssr(b: &mut Bencher) {
55
55
} ) ;
56
56
} ) ;
57
57
}
58
-
58
+ /*
59
59
#[bench]
60
60
fn leptos_todomvc_ssr_with_1000(b: &mut Bencher) {
61
61
b.iter(|| {
@@ -107,3 +107,4 @@ fn yew_todomvc_ssr_with_1000(b: &mut Bencher) {
107
107
});
108
108
});
109
109
}
110
+ */
Original file line number Diff line number Diff line change @@ -104,8 +104,9 @@ impl HydrationCtx {
104
104
} )
105
105
}
106
106
107
+ #[ doc( hidden) ]
107
108
#[ cfg( not( all( target_arch = "wasm32" , feature = "web" ) ) ) ]
108
- pub ( crate ) fn reset_id ( ) {
109
+ pub fn reset_id ( ) {
109
110
ID . with ( |id| * id. borrow_mut ( ) = Default :: default ( ) ) ;
110
111
}
111
112
You can’t perform that action at this time.
0 commit comments