Giter Club home page Giter Club logo

Comments (2)

fregante avatar fregante commented on August 10, 2024

Can SublimeText know when the browser has finished receiving an update? Rather than using an arbitrary throttling duration, SublimeText could wait for the browser's response before sending a new update. Could that work?

from ghosttext.

Cacodaimon avatar Cacodaimon commented on August 10, 2024

Can SublimeText know when the browser has finished receiving an update? Rather than using an arbitrary throttling duration, SublimeText could wait for the browser's response before sending a new update. Could that work?

We could update the protocol sending an "update processed message" back to the server, but this solutions drawback would be heavy increased complexity.

Let's take the JS code editor with the Firefox add on as currently most complex solution of message passing, the pages JS scope has to inform the content script scope that the text change has been processed this message has to be passed to the main script which has to pass the message to the background script which finally sends the "update processed message" to the server.

The server code needs some more logic, too. Take a look at the current Atom prototype: https://github.com/Cacodaimon/GhostText-for-Atom/blob/master/lib/ghost-text.coffee less than 80 lines of code are enough for a minimalistic solution or this prototype of an gedit3 plug in: https://gist.github.com/Cacodaimon/eebeb67043b3acef3282 140 lines + the ST plugin's WebSocket and HTTP code are enough for this prototype to work.

I like your Idea because it is more deterministic, but I'm afraid that increasing the complexity could slow down the development.

We have no statistics about the used, but I believe the most texts edited with GT are smaller ones like this comment rather large CSS files which caused this issue: Connection errors #31 #29 . Which could means that this issue would increase the complexity for less than 20% of the use cases.

from ghosttext.

Related Issues (20)

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.