Skip to content

Commit 83412b8

Browse files
committed
fix defer in script; fix new-loop frequency
1 parent 0127805 commit 83412b8

File tree

3 files changed

+48
-15
lines changed

3 files changed

+48
-15
lines changed

calcit.cirru

+44-11
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,20 @@
10291029
|j $ {} (:type :expr) (:id |HkOX49LlxCSb) (:by nil) (:at 1500541010211)
10301030
:data $ {}
10311031
|T $ {} (:type :leaf) (:id |BJKXEcLge0rZ) (:text |[]) (:by |root) (:at 1500541010211)
1032-
|v $ {} (:type :leaf) (:id |BynXN5UxlRBb) (:text "|\"/client.js") (:by |B1y7Rc-Zz) (:at 1544854527659)
1032+
|v $ {} (:type :expr) (:by |B1y7Rc-Zz) (:at 1593532425570)
1033+
:data $ {}
1034+
|T $ {} (:type :expr) (:by |B1y7Rc-Zz) (:at 1593532426681)
1035+
:data $ {}
1036+
|T $ {} (:type :leaf) (:id |BynXN5UxlRBb) (:text "|\"/client.js") (:by |B1y7Rc-Zz) (:at 1593532427728)
1037+
|D $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593532428945) (:text |:src) (:id |4SgXVlLRK)
1038+
:id |2dfqM23Km-
1039+
|D $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593532426285) (:text |{}) (:id |PqQxRwaGdq)
1040+
|j $ {} (:type :expr) (:by |B1y7Rc-Zz) (:at 1593532429306)
1041+
:data $ {}
1042+
|T $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593532430739) (:text |:defer?) (:id |YiF4D8OxAvleaf)
1043+
|j $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593532431326) (:text |true) (:id |krokH-pUhd)
1044+
:id |YiF4D8OxAv
1045+
:id |E0tSwhC6s4
10331046
|v $ {} (:type :expr) (:by |B1y7Rc-Zz) (:at 1535565937028) (:id |LSNXLwDH1b)
10341047
:data $ {}
10351048
|T $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1535565940014) (:text |:inline-styles) (:id |LSNXLwDH1bleaf)
@@ -1150,13 +1163,33 @@
11501163
|r $ {} (:type :expr) (:id |rkegeSfklf) (:by |root) (:at 1511101672252)
11511164
:data $ {}
11521165
|T $ {} (:type :leaf) (:text |map) (:id |rkegeSfklfleaf) (:by |root) (:at 1511101674855)
1153-
|j $ {} (:type :expr) (:id |rkQmxSG1eG) (:by |root) (:at 1511101675420)
1166+
|j $ {} (:type :expr) (:by |B1y7Rc-Zz) (:at 1593532436924)
11541167
:data $ {}
1155-
|T $ {} (:type :leaf) (:text "|#()") (:id |HJMQgrfygM) (:by |root) (:at 1511101676925)
1156-
|j $ {} (:type :leaf) (:text |->) (:id |BJ-BlBGyxG) (:by |root) (:at 1511101680541)
1157-
|r $ {} (:type :leaf) (:text |%) (:id |S1ierz1lf) (:by |root) (:at 1511101684408)
1158-
|v $ {} (:type :leaf) (:text |:output-name) (:id |BJ6lrMyeG) (:by |root) (:at 1511101691302)
1159-
|x $ {} (:type :leaf) (:text |prefix-cdn) (:id |B1EXZrfJlz) (:by |root) (:at 1511101696320)
1168+
|T $ {} (:type :expr) (:by |B1y7Rc-Zz) (:at 1593532440593)
1169+
:data $ {}
1170+
|T $ {} (:type :expr) (:by |B1y7Rc-Zz) (:at 1593532441509)
1171+
:data $ {}
1172+
|T $ {} (:type :expr) (:id |rkQmxSG1eG) (:by |root) (:at 1511101675420)
1173+
:data $ {}
1174+
|j $ {} (:type :leaf) (:text |->) (:id |BJ-BlBGyxG) (:by |root) (:at 1511101680541)
1175+
|r $ {} (:type :leaf) (:text |x) (:id |S1ierz1lf) (:by |B1y7Rc-Zz) (:at 1593532434709)
1176+
|v $ {} (:type :leaf) (:text |:output-name) (:id |BJ6lrMyeG) (:by |root) (:at 1511101691302)
1177+
|x $ {} (:type :leaf) (:text |prefix-cdn) (:id |B1EXZrfJlz) (:by |root) (:at 1511101696320)
1178+
|D $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593532443180) (:text |:src) (:id |9HVpXJyHyb)
1179+
:id |kNTRdEJRsK
1180+
|D $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593532441142) (:text |{}) (:id |NbLQlrSzt5)
1181+
|j $ {} (:type :expr) (:by |B1y7Rc-Zz) (:at 1593532443564)
1182+
:data $ {}
1183+
|T $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593532445134) (:text |:defer?) (:id |1bH7-PLPQDleaf)
1184+
|j $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593532446416) (:text |true) (:id |8dAdE_76ie)
1185+
:id |1bH7-PLPQD
1186+
:id |r7EXWAHWc6
1187+
|D $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593532439054) (:text |fn) (:id |CTqDMR7RT)
1188+
|L $ {} (:type :expr) (:by |B1y7Rc-Zz) (:at 1593532439412)
1189+
:data $ {}
1190+
|T $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593532439674) (:text |x) (:id |l-t1gg4t2)
1191+
:id |NWBjMA_RGO
1192+
:id |MfRmOXTdhJ
11601193
|r $ {} (:type :leaf) (:text |assets) (:id |HJgKbSzylf) (:by |root) (:at 1511101697964)
11611194
:proc $ {} (:type :expr) (:id |HkeeN5LegRBZ) (:by nil) (:at 1500541010211) (:data $ {})
11621195
|app.schema $ {}
@@ -3941,10 +3974,10 @@
39413974
|r $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1544724852267) (:text |assoc) (:id |RtJEI2TOLuk)
39423975
|v $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1544724852267) (:text |sid) (:id |LzutOPLyPUJ)
39433976
|x $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1544724852267) (:text |new-store) (:id |9TOGzOT7RCz)
3944-
|x $ {} (:type :expr) (:by |B1y7Rc-Zz) (:at 1593255041829)
3945-
:data $ {}
3946-
|T $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593255047538) (:text |new-twig-loop!) (:id |ADpVKOjkRleaf)
3947-
:id |ADpVKOjkR
3977+
|x $ {} (:type :expr) (:by |B1y7Rc-Zz) (:at 1593532341963)
3978+
:data $ {}
3979+
|T $ {} (:type :leaf) (:by |B1y7Rc-Zz) (:at 1593532341963) (:text |new-twig-loop!) (:id |nAOPfdmY2D)
3980+
:id |nB3YFLiS04
39483981
|*client-caches $ {} (:type :expr) (:id |S1VrmlLWxAr-) (:by nil) (:at 1500541255553)
39493982
:data $ {}
39503983
|T $ {} (:type :leaf) (:id |HyrB7gIWeCrb) (:text |defonce) (:by |root) (:at 1500541255553)

src/app/page.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
(merge
2222
base-info
2323
{:styles [(<< "http://~(get-ip!):8100/main.css") "/entry/main.css"],
24-
:scripts ["/client.js"],
24+
:scripts [{:src "/client.js", :defer? true}],
2525
:inline-styles []})))
2626

2727
(defn prod-page []
@@ -34,7 +34,7 @@
3434
(merge
3535
base-info
3636
{:styles [(:release-ui config/site)],
37-
:scripts (map #(-> % :output-name prefix-cdn) assets)}))))
37+
:scripts (map (fn [x] {:src (-> x :output-name prefix-cdn), :defer? true}) assets)}))))
3838

3939
(defn main! []
4040
(println "Running mode:" (if config/dev? "dev" "release"))

src/app/server.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
(if (not= changes [])
6565
(do
6666
(wss-send! sid {:kind :patch, :data changes})
67-
(swap! *client-caches assoc sid new-store)))
68-
(new-twig-loop!)))))
67+
(swap! *client-caches assoc sid new-store))))))
68+
(new-twig-loop!))
6969

7070
(defn render-loop! []
7171
(when (not (identical? @*reader-reel @*reel))

0 commit comments

Comments
 (0)