1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Mass_parse: Fix memory leak / slow performance due to over-zealous page caching

This commit is contained in:
gnosygnu
2016-12-12 09:25:06 -05:00
parent 8f68854513
commit 5e159233ab
10 changed files with 48 additions and 26 deletions

View File

@@ -18,11 +18,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa.xtns.proofreadPage; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import org.junit.*; import gplx.xowa.apps.cfgs.*;
public class Pp_pages_nde_hdr_tst {
private final Xop_fxt fxt = new Xop_fxt();
private final Xop_fxt fxt = new Xop_fxt();
@Before public void Init() {
Io_mgr.Instance.InitEngine_mem();
fxt.Wiki().Xtn_mgr().Xtn_proofread().Enabled_y_();
fxt.Wiki().Cache_mgr().Page_cache().Free_mem_all();
fxt.Wiki().Cache_mgr().Page_cache().Free_mem(true);
fxt.Wiki().Db_mgr().Load_mgr().Clear(); // must clear; otherwise fails b/c files get deleted, but wiki.data_mgr caches the Xowd_regy_mgr (the .reg file) in memory;
fxt.Wiki().Ns_mgr().Add_new(Xowc_xtn_pages.Ns_page_id_default, "Page").Add_new(Xowc_xtn_pages.Ns_index_id_default, "Index").Init();
fxt.Init_page_create("MediaWiki:Proofreadpage_header_template", String_.Concat