Git Product home page Git Product logo

Comments (4)

santhoshtr avatar santhoshtr commented on July 24, 2024 1

Have you consider using getChangedRanges to execute the plugin only on the changed nodes?

No. I was not aware of this. Thanks for the link.

There are many optimization ideas we can apply for spellcheck or similar usecases. For example, keeping the dictionary of words and the corresponding API result(spellcheck result) and checking the word in that one before an API request, so that we can fast lookups. That would be independent of transactions and text changes. Imagine a paragraph is cut(Say Transaction-12) and then pasted somewhere else as Transaction-42. In such case, a content diff from previous transactions wont save API cost, but the cached results would help. Am I right?

For my usecase, I was not interested in optimizing this editor usage since my purpose is just demo the spellcheck API. Improving the spellcheck and underlying morphology anayser is where I would spend time. But definitely the spellchecker won't be useful if there is no good text editor :-)

from mlmorph.

santhoshtr avatar santhoshtr commented on July 24, 2024

Thanks for the question. Yes, I did this intentionally, but not for any performance optimization(I have not checked if there is a problem with performance by doing like this). This was just a lazy attempt to avoid waiting for all promises(checknode is async) to finish, aggregate all problems. I thought if I just dispatch the transaction, once the node is checked is more easier and may be faster response to user. By the way, nodes are not necessarily lines, they are probably paragraphs, or inline markup elements.

from mlmorph.

whawker avatar whawker commented on July 24, 2024

That's interesting, thank you very much.

Have you consider using getChangedRanges to execute the plugin only on the changed nodes?

from mlmorph.

whawker avatar whawker commented on July 24, 2024

Thanks so much for your insights! Very helpful and much appreciated!

from mlmorph.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.