Could you let users of the library opt in to a faster, less compliant mode?
-
-
Replying to @bencpye
I was thinking about adding a function to approximate a blurred rounded rect like NanoVG does.
1 reply 0 retweets 9 likes -
Definitely interested in a fast-as-possible and non spec-compliant mode for building a user interface.
2 replies 0 retweets 0 likes -
-
Yeah, sorry maybe I’m not being clear. It seems like pathfinders nanovg demo is pretty fast but not as fast as nanovg... is that just a function of the canvas library needing to match the web? Your earlier tweets on this thread seemed to indicate that.
1 reply 0 retweets 0 likes -
Replying to @nathansobo @bencpye
The main problems with it are text layout/font loading and blurs. It’s also just a demo that’s very focused on a certain workload. PF should be way faster at rendering the tiger than NanoVG for instance.
1 reply 0 retweets 0 likes -
Text layout is most of the CPU time in that benchmark. Pathfinder uses proper Unicode text shaping via HarfBuzz rather than NanoVG’s very limited support. There’s a lot of room for improvement for PF here, it’s just work.
1 reply 0 retweets 0 likes -
Also, there’s the fact that NanoVG doesn’t even draw text as paths—it draws them as a bitmap using stb_truetype and caches the results, so it’s just blitting rects. PF is drawing every glyph as true vectors, which is going to be slower. I want to add a glyph cache at some point.
1 reply 0 retweets 0 likes -
That demo is supposed to be more of an example of how to use the library as opposed to a performance benchmark.
1 reply 0 retweets 0 likes -
Thanks for taking the time to explain all that. Considering doing a text editor on top of pathfinder based largely on watching your talk where you were zooming that window full of text. Does that use case seem reasonable in its current state?
1 reply 0 retweets 0 likes
Yep, should be! Please file issues as you encounter them :)
-
-
Thanks for your incredible work. Really an inspiration.
0 replies 0 retweets 3 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.