Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1014166 // indexedSimpleWikipedia_fast - returns "magic" map; makes/uses .index file

JavaX fragment (include)

static Map<S, WikiPage> indexedSimpleWikipedia_fast() {
  File f = unpackSimpleWikipedia();
  File cacheFile = getProgramFile(#1008009, "simplewiki-" + fileSize(f) + ".index.gz");
  
  if (fileSize(cacheFile) == 0)
    saveGZStructureToFile(cacheFile, asList(indexSimpleWikipedia()));

  Map<S, IndexedWikiPage> map = ciMap();    
  for (IndexedWikiPage ip : (L<IndexedWikiPage>) unstructureGZFile(cacheFile))
    map.put(ip.title, ip);
  ret indexedSimpleWikipedia_magicMap(map);
}

Author comment

Began life as a copy of #1014162

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney

No comments. add comment

Snippet ID: #1014166
Snippet name: indexedSimpleWikipedia_fast - returns "magic" map; makes/uses .index file
Eternal ID of this version: #1014166/12
Text MD5: 8d2d63062e29b8edb54c003e35fb92ab
Author: stefan
Category: javax / a.i. / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-03 19:03:46
Source code size: 493 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 322 / 349
Version history: 11 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1014170 - indexedSimpleWikipedia_get
#1014171 - indexedSimpleWikipedia_fast_cached