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

Performance on long book texts is poor #251

Open
leojonathanoh opened this issue Jun 24, 2021 · 0 comments
Open

Performance on long book texts is poor #251

leojonathanoh opened this issue Jun 24, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@leojonathanoh
Copy link
Member

leojonathanoh commented Jun 24, 2021

Current

Performance on long book texts is poor

Expectation

Performance on long book texts is not poor

Discussion

Performance on long book texts is poor e.g. >=10000 characters.

Related: #240 #249 #7 #251

As suggested in #249, there needs to be a way to update the Trainer Speech with less changes in the DOM, to ensure Response and Speech performance does not stutter.

A possibility is to break up the book text into chunks of 10000 characters. Each chunk will correspond to a HTMLElement / HTMLTextElement. On book init, the Speech element is updated with these elements. Upon each Response, Trainer Speech feedback is only generated for the current chunk (i.e. zone the Response cursor is in) and only the corresponding HTMLElement updated. In such an implementation, there is only at most 10000 character elements updated in the DOM on each Response event, which should greatly enhance App responsiveness for long book texts.

  • One downside is that the Student will not be able to view Speech feedback in peripheral chunks.
    • However, arguably this downside only applies to non-perfection, since in perfection the Speech never shows more than one error (i.e. error at the cursor).
@leojonathanoh leojonathanoh self-assigned this Jun 24, 2021
@leojonathanoh leojonathanoh added the enhancement New feature or request label Jun 24, 2021
@leojonathanoh leojonathanoh added this to the v0.93.0 milestone Jun 24, 2021
@leojonathanoh leojonathanoh modified the milestones: v0.93.0, v0.94.0, v0.95.0, v0.96.0 Jul 1, 2021
@leojonathanoh leojonathanoh modified the milestones: v0.96.0, v0.97.0, v0.98.0 Jul 23, 2021
@leojonathanoh leojonathanoh modified the milestones: v0.98.0, v0.99.0 Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant