Comments (4)
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.
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.
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.
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)
- Add strong name for .NET framework HOT 1
- StrikeThrough and Underline not visible for certain fonts and small sizes HOT 4
- Different line break behavior based on how texts are added HOT 1
- MessuredHeight hangs on Linux HOT 2
- Missing glyphs when rendering clusters with unmatched combining characters HOT 1
- Missing glyphs and inccorect breaks when setting MaxLines on TextBlock containing line breaks HOT 2
- [Bug]Pagewidth does not work on white spaces
- Is this library still active? HOT 2
- Throw a more informative exception when FontFamily is missing from the Style specified in a TextBlock
- Underline and StrikeThrough incorrect when given font size is very smaller HOT 2
- Distinguish between italic and oblique variants of a font HOT 2
- [Bug] LetterSpacing not working when using on part of the text only
- [Bug] Subscript and Superscript not working when using on part of the text only
- [Question or Feature Request] How to determine "overbounds"?
- Annoying style issue with paragraph separators HOT 1
- Word-based-navigation fails if word has " in front
- Text with custom font is not rendered if the height of the text to draw equals the MaxHeight HOT 1
- Support for TextAlignment.Justify HOT 1
- TextColor of RichString method does not work after construction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from richtextkit.