Giter Site home page Giter Site logo

Comments (4)

toptensoftware avatar toptensoftware commented on July 28, 2024

Are these thousands of labels all visible at once?

Usually you should clip those down and just paint the visible ones and normally a full screen of text can be rendered quite easily by RichTextKit.

If you're actually painting thousands of labels that are all visible I'd suggest caching the rendered results and doing partial updates when they change.

from richtextkit.

parentelement avatar parentelement commented on July 28, 2024

Agree with Brad. I tested with a couple million words and rendering every frame (due to having to use a shared Skia instance in Avalonia) and everything was buttery smooth... Apply styles, typing, scrolling, copy and paste. The only thing that was slow, as expected, was if I did a Select All and applied a style to the entire document, but even then it performed faster than MS Word for the exact same text and operation.

from richtextkit.

andrey-shavelev avatar andrey-shavelev commented on July 28, 2024

Thanks for your suggestions. There are indeed several user scenarios when all these labels are visible at once. For instance, when the whiteboard opens, it opens in a bird-eye view.
Caching of rendering results is already something that I have. However, it doesn't cover everything. Zooming in/out often requires redrawing the whole thing when users are in a bird-eye view. There are other technics that can help tackle this, like view degradation, for instance. Still, at some point, you have to redraw the whole thing, and otherwise smooth navigation gives a lag.

from richtextkit.

toptensoftware avatar toptensoftware commented on July 28, 2024

I'm happy to consider a pull request for caching SK objects, so long as:

  • it doesn't affect memory usage too severely and
  • everything is cleaned up correctly
  • doesn't require API changes if you're not using caching. (ie: doesn't break existing code)

from richtextkit.

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.