mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Cldr: Add initial support for cldr
This commit is contained in:
@@ -45,6 +45,8 @@ public class Xomp_parse_mgr {
|
||||
Xof_orig_wkr__img_links file_orig_wkr = new Xof_orig_wkr__img_links(wiki);
|
||||
if (cfg.Load_all_imglinks()) Xof_orig_wkr__img_links_.Load_all(file_orig_wkr);
|
||||
|
||||
wiki.Appe().Wiki_mgr().Wdata_mgr().Doc_mgr.Cache__init(cfg.Wbase_cache_mru_type(), cfg.Wbase_cache_mru_size(), cfg.Wbase_cache_mru_compress_size(), cfg.Wbase_cache_mru_weight());
|
||||
|
||||
// load_wkr: init and start
|
||||
// Xomp_load_wkr load_wkr = new Xomp_load_wkr(wiki, db_mgr.Mgr_db().Conn(), cfg.Num_pages_in_pool(), cfg.Num_wkrs());
|
||||
// Thread_adp_.Start_by_key("xomp.load", Cancelable_.Never, load_wkr, Xomp_load_wkr.Invk__exec);
|
||||
@@ -84,6 +86,7 @@ public class Xomp_parse_mgr {
|
||||
latch.Await();
|
||||
page_pool.Rls();
|
||||
if (indexer != null) indexer.Term();
|
||||
wiki.Appe().Wiki_mgr().Wdata_mgr().Doc_mgr.Cleanup();
|
||||
|
||||
// print stats
|
||||
Bry_bfr bfr = Bry_bfr_.New();
|
||||
|
||||
@@ -38,6 +38,10 @@ public class Xomp_parse_mgr_cfg implements Gfo_invk {
|
||||
public boolean Show_msg__fetched_pool() {return show_msg__fetched_pool;} private boolean show_msg__fetched_pool;
|
||||
public boolean Indexer_enabled() {return indexer_enabled;} private boolean indexer_enabled;
|
||||
public String Indexer_opt() {return indexer_opt;} private String indexer_opt = gplx.gflucene.indexers.Gflucene_idx_opt.Docs_and_freqs.Key();
|
||||
public String Wbase_cache_mru_type() {return wbase_cache_mru_type;} private String wbase_cache_mru_type = "mru";
|
||||
public long Wbase_cache_mru_size() {return wbase_cache_mru_size;} private long wbase_cache_mru_size = 100;
|
||||
public long Wbase_cache_mru_weight() {return wbase_cache_mru_weight;} private long wbase_cache_mru_weight = 10;
|
||||
public long Wbase_cache_mru_compress_size() {return wbase_cache_mru_compress_size;} private long wbase_cache_mru_compress_size = 70;
|
||||
public void Init(Xowe_wiki wiki) {
|
||||
if (num_wkrs == -1) num_wkrs = gplx.core.envs.Runtime_.Cpu_count();
|
||||
if (num_pages_in_pool == -1) num_pages_in_pool = num_wkrs * 1000;
|
||||
@@ -68,6 +72,10 @@ public class Xomp_parse_mgr_cfg implements Gfo_invk {
|
||||
else if (ctx.Match(k, Invk__log_math_)) log_math = m.ReadYn("v");
|
||||
else if (ctx.Match(k, "indexer_enabled_")) indexer_enabled = m.ReadYn("v");
|
||||
else if (ctx.Match(k, "indexer_opt_")) indexer_opt = m.ReadStr("v");
|
||||
else if (ctx.Match(k, "wbase_cache_mru_type_")) wbase_cache_mru_type = m.ReadStr("v");
|
||||
else if (ctx.Match(k, "wbase_cache_mru_size_")) wbase_cache_mru_size = m.ReadLong("v");
|
||||
else if (ctx.Match(k, "wbase_cache_mru_weight_")) wbase_cache_mru_weight = m.ReadLong("v");
|
||||
else if (ctx.Match(k, "wbase_cache_mru_compress_size_")) wbase_cache_mru_compress_size = m.ReadLong("v");
|
||||
else return Gfo_invk_.Rv_unhandled;
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user