Skip to content

Proposal: revamp the refresh method for better rendering performance #150

@jerch

Description

@jerch

To start the discussion about the screen representation and rendering process here are some first ideas:

  • pre container instead of div
    pre context can be rendered faster by most browser engines due to the reduced capabilities. Downside - reduced capabilities ;)
  • document fragments
    Although this needs more JS code with all the explicit node manipulation it is super fast compared to innerHTML. IMHO a must-do ;)
  • clever caching
    The emulator is caching real DOM nodes at line level at the moment. Maybe another caching strategy in combination with fragments might lift the burden to some degree.
  • use canvas instead of DOM nodes
    This is a hard one, not sure if this is worth the trouble at all. Would give the full power of what is going to be shown. Downside - needs tons of JS code to get the layouting done and all those nifty events we get with DOM nodes for free. No clue if it will show better performance in the end since text rendering on canvas is not that good. Maybe someone has experience with that, therefore open for discussion...
  • spot and rearrange style requesting calls
    Those calls will almost always trigger an incremental synchronous re-layouting (full stop until reflow is done). Needs to be checked...

Somewhat offtopic but still performance relevant:

  • scrolling
    What about native scrolling? Other ideas?
  • output alignment
    Some unicode chars will break the terminal grid. Needs some CSS rules, maybe even some kind of font glyph measuring tricks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions