Note that there are some explanatory texts on larger screens.

plurals
  1. POStarDict support for JavaScript and a Firefox OS App
    primarykey
    data
    text
    <p>I wrote a dictionary app in the spirit of GoldenDict (www.goldendict.org, also see Google Play Store for more information) for Firefox OS: <a href="http://tuxor1337.github.io/firedict" rel="nofollow">http://tuxor1337.github.io/firedict</a> and <a href="https://marketplace.firefox.com/app/firedict" rel="nofollow">https://marketplace.firefox.com/app/firedict</a></p> <p>Since apps for ffos are based on HTML, CSS and JavaScript (WebAPI etc.), I had to write everything from scratch. At first, I wrote a basic library for synchronous and asynchronous access to StarDict dictionaries in JavaScript: <a href="https://github.com/tuxor1337/stardict.js" rel="nofollow">https://github.com/tuxor1337/stardict.js</a></p> <p>Although the app can be called stable by now, overall performance is still a bit sluggish. For some dictionaries, I have a list of words of almost 1,000,000 entries! That's huge. Indexing takes a really long time (up to several minutes per dictionary) and lookup as well. At the moment, the words are stored in an IndexedDB object store. Is there another alternative? With the current solution (words accessed and inserted using binary search) the overall experience is pretty slow. <del>Maybe it would become faster, if there was some locale sort support by IndexedDB...</del> Actually, I'm not even storing the terms themselves in the DB but only their offsets in the *.syn/*.idx file. I hope to save some memory doing that. But of course I'm not able to use any IDB sorting functionality with this configuration...</p> <p>Maybe it's not the best idea to do the sorting in memory, because now the app is killed by the kernel due to an OOM on some devices (e.g. ZTE Open). A dictionary with more than 500,000 entries will definitely exceed 100 MB in memory. (That's only 200 Byte per entry and if you suppose the keyword strings are UTF-8, you'll exceed 100 MB immediately...)</p> <p>Feel free to contribute directly to the project on GitHub. Otherwise, I would be glad to hear your advice concerning the above issues.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload