From 5f47cb329f23abb3fdbcbaab9f5afa5a5874daab Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Fri, 14 Jun 2024 09:16:38 +0300 Subject: [PATCH] [load-time-optimization] improve expand-moves We did not really needed libfcs-wrap . Also see https://www.shlomifish.org/meta/FAQ/site_loads_quickly.xhtml --- .../src/js-fc-solve/expand-moves/index.html.tt2 | 2 +- fc-solve/site/wml/src/ts/expand-moves-ui.ts | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/fc-solve/site/wml/src/js-fc-solve/expand-moves/index.html.tt2 b/fc-solve/site/wml/src/js-fc-solve/expand-moves/index.html.tt2 index fd60b0a9f..b97495cea 100644 --- a/fc-solve/site/wml/src/js-fc-solve/expand-moves/index.html.tt2 +++ b/fc-solve/site/wml/src/js-fc-solve/expand-moves/index.html.tt2 @@ -28,7 +28,7 @@ card solitaire game, and several related solitaire games< [% INCLUDE set_up_tabs %] [% END %] window.my_web_fc_solve_ui = expand_moves_ui; - expand_moves_ui.set_up(module_wrapper); + expand_moves_ui.set_up(null); [% IF enable_jquery_ui %] $( "#output_tabs" ).tabs(); [% END %] diff --git a/fc-solve/site/wml/src/ts/expand-moves-ui.ts b/fc-solve/site/wml/src/ts/expand-moves-ui.ts index a3d13c1a9..4d72fb271 100644 --- a/fc-solve/site/wml/src/ts/expand-moves-ui.ts +++ b/fc-solve/site/wml/src/ts/expand-moves-ui.ts @@ -2,23 +2,15 @@ import * as s2i from "./s2ints_js"; import * as BaseApi from "./web-fcs-api-base"; import * as base_ui from "./fcs-base-ui"; import * as expander from "./web-fc-solve--expand-moves"; -import Module from "./libfcs-wrap"; import * as w from "./find-fc-deal"; let _module_wrapper: w.ModuleWrapper; export function init_module(cb: (mw: BaseApi.ModuleWrapper) => any): any { - const _my_module = Module({ - onRuntimeInitialized: () => { - _my_module.then((result) => { - const module_wrapper = - w.FC_Solve_init_wrappers_with_module(result); - _module_wrapper = module_wrapper; - cb(module_wrapper); - return 0; - }); - }, - }); + const module_wrapper = null; + _module_wrapper = module_wrapper; + cb(module_wrapper); + return; } function _create_bmark_obj() {