Comment by refulgentis

Comment by refulgentis 11 hours ago

5 replies

I've been shipping a Flutter app that uses it for months. Pretty heavy stuff, its doing everything from LLM inference to model inference to maintaining a vector store and indexeddb in your browser.

Frame latency feels like it's gone, there's 100% a significant decrease in perceived latency.

I did have a frustrating performance issues with 3rd party code doing "source code parsing" via RegEx, thought it was either the library or Flutters fault, but from the article content, sounds like it was WASM GC. (saw a ton of time spent converting objects from JS<->WASM on a 50 KLOC file)

From that perspective, the article sounds a bit maximalist in its claims, but only from my perspective.

I think if you read "real time graphics" as "3d game" it gives a better understanding of where it's at, my anecdata aside.

lukasb 10 hours ago

When you said "jump in perceived latency", did you mean perceived latency went up or down?

ripped_britches 9 hours ago

Which libraries caused these problems for you?

  • refulgentis 9 hours ago

    Don't wanna name names, because it's on me, it's a miracle it exists, and works.

    I don't think there's a significant # of alternatives, so hopefully Flutter syntax highlighting library, as used in a package for making markdown columns, is enough to be helpful.

    Problem was some weird combo of lots of regex and an absolutely huge amount of code. It's one of those problems it's hard for me to draw many conclusions from:

    - Flutter may be using browser APIs for regex, so there's some sort of JS/WASM barrier copying cost

    - The markdown column renderer is doing nothing at all to handle this situation lazily, i.e. if any portion of the column is displayed, syntax highlighting must be done on the complete markdown input

    - Each different color text, so pretty much every word, gets its own object in the view hierarchy, tens if not hundreds of thousands this case. Can't remember if this is due to the syntax highlighting library or the markdown package

    - Regex is used to parse to code and for all I know one of them has pathological performance like backtracking unintentionally.