Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory bug when trying to read a long text #163

Open
ofou opened this issue Oct 30, 2017 · 0 comments
Open

Memory bug when trying to read a long text #163

ofou opened this issue Oct 30, 2017 · 0 comments

Comments

@ofou
Copy link

ofou commented Oct 30, 2017

Hello guys! ✋ I was trying to read a book from Gutenberg website (209k words) but it crashed due to memory issues and I tried with another long text (about a 28k words) it can be read it but unfortunately becoming slow and not displaying the text at an actual or real WPM. Do you experience the same issue? ☹️

I checked Chrome Dev performance on the second text and it showed this

image

toNode: function(word) {
    var node = dom.makeDiv({'class': 'word'});
    node.word = w.parseSQInstructionsForWord(word, node);

    var orpIdx = w.getORPIndex(node.word);

    node.word.split('').map(function charToNode(char, idx) {
      var span = dom.makeEl('span', {}, node);
      span.textContent = char;
      if(idx == orpIdx){
        span.classList.add('orp');
        node.orp = span;
      }
    });

    node.delayFactor = w.getDelay(node);

    return node;
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant