OverviewFelgo 1 Support › Is there a maximum size for imported Javascript?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #7031


    I’m trying to build a word game, and I’m using the YAWL word list ( I’ve set the word list up as a JS array like so:

    var yawlWordList = [
        //266k more lines of this


    When I import the entire word list, the app logs look like it is about to launch and then just fail.  If I trim the word list down to five entries it works just fine.


    Is there a memory limit, and if so, is it safe to increase it (if possible)?


    Thanks much in advance!



    Felgo Team

    Hi Rohan,

    I’m not aware of a memory limit for the JS scope in QML. Maybe you can also ask this question over at the Qt support forums, as it is not specific to Felgo?

    As a workaround, you could split up your file into more smaller ones and store it as a JS map not an array, which simplifies finding.





    Thanks for the info, Christian.  I’ll follow up with the Qt team at some point.  For the time being, I got it working by converting it to JSON, and using FileUtils to read it.  The code if anyone is interested:


    Component.onCompleted: {
        var wordListUrl = Qt.resolvedUrl("Data/YAWL.json");
        wordList = JSON.parse(fileUtils.readFile(wordListUrl.toString()));
    function doesWordExist(word) {
        if (wordList.indexOf(word.toLowerCase()) >= 0) {
            return true;
        return false;

    The check function is actually really slow, and your plan of splitting it up is definitely the way to go.  Creating an indexed hash would speed it up immensely, I’m thinking.


    Once I get a utility for breaking the index down, I’ll post that as well.

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support