Git Product home page Git Product logo

Comments (5)

tombh avatar tombh commented on June 6, 2024

It certainly is a guaranteed lag of 200ms :(

I haven't tried any of Browsh in Chrome yet, there's just too much Firefox-specific code.

The only clue I have to the cause of the bug is that's maybe to do with that fact that the webextension hides all text when it very first loads a page. Note that this.buildFormattedText(); itself contains;

this.graphics_builder.getScreenshotWithText();
this.graphics_builder.getScreenshotWithoutText();

So the flow of text rendering events is this; native page load renders text, webextension boots and hides all text, text parsing begins and a hack to show text is needed, then actual text parsing begins for real in this.buildFormattedText(); which then does the only ever essentially needed show then hide of text.

Bear in mind that defaulting to having the native browser page rendered without text means that rendering of graphics frames is dramatically improved, by a factor of around 10.

from browsh.

tobimensch avatar tobimensch commented on June 6, 2024

I have an idea that also has some major disadvantages as it is probably a waste of resources (RAM, CPU) in itself, however that doesn't keep me from proposing it.

Did you think about using two renderers, one always rendering with text and one always rendering without text (so only graphics)? Everything else being the same, meaning they get the same user input etc.

In that case any inefficiencies caused by the hiding/showing of text should be eliminated.

This seems like a hacky solution (if it works at all). Just some food for thought.

from browsh.

tobimensch avatar tobimensch commented on June 6, 2024

I think the timeout (and other variables like it) should be configurable.

Then I could play around with it and I might figure out if the rendering problems become less with a higher timeout (than 200ms).

from browsh.

tombh avatar tombh commented on June 6, 2024

Already ahead of you there. The graphics and text renderers are already completely separate, sending frames updates independently.

I just realised, you know that sendRawText() is only for the HTTP Server? So this 200ms delay doesn't apply to the TTY client.

from browsh.

tobimensch avatar tobimensch commented on June 6, 2024

I just realised, you know that sendRawText() is only for the HTTP Server? So this 200ms delay doesn't apply to the TTY client.

It makes sense now that I know it. :-)

from browsh.

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.