Re: Dimensions
Posted by sand1024 on Dec 04, 2024; 6:08pm
URL: https://forum.librecad.org/Dimensions-tp5725567p5725755.html
Hi dxli,
>If we can achieve linear complexity, those optimization can be turned off.
Well, honestly, I don't think it will be possible to render texts faster without complete re-writing internal fonts implementation, text/mtext entities and rendering.
I've already tried to speedup working/rendering texts in all places where it was possible without complete rewrite - as part of the overall rendering speed improving and yes, I've measured performance of rendering there.
However, internally there is, well, quite a straightforward implementation of fonts that involves creation of quite a significant amount of entities internally (like lines, inserts for letters, polylines individual lines/arcs that are parts of polylines) - and direct rendering of them. So there is not such things like glyphs or so - and basically most of calculations are performed again and again (even for the same letter).
Also, for example, previously, there was a huge performance loss on rendering in setup of painter for all that text/related stuff - for each individual entity (within letter!) individually. Now I've fixed that so if works faster, added caching calculation results where possible - yet still, the functionality for rendering texts is too far from ideal, as for me.