Is Ionic the best Choice for a PWA from Scratch?

I would stop worrying about performance here, especially before a single line of code is written, because you’ve already answered your own question:

What you’re calling “Ionic’s webview” is the same browser that any PWA runs in. A browser is a general-purpose JavaScript emulator and application UI environment. Special-purpose tools can sometimes do specific things more efficiently than general-purpose tools, but you’ve already committed to having your app live in a browser the minute you decided to write a PWA. So any remaining concerns about performance are going to be minimal and at the margins, and I hope I can assuage them with some further definitional clarification.

In an ordinary Ionic Angular application,

  • the browser provides the runtime environment
  • Angular provides the dispatch and object wrangling framework
  • Ionic writes a bunch of UI components that are designed for familiar mobile UX and intended to also scale up well to larger screens and desktop environments

So any of those three layers could theoretically be optimized, but I at least am quite confident that I do not have the skills or resources to do a better job of frameworking than the Angular team. If you want to try your hand at that, it’s possible (or you could use React or Vue if you wish; I have zero experience with either). The first layer we’ve already covered: if you’re making a PWA, you’re committed to accepting it.

As for the third layer, that’s the only time Stencil would come into play regarding performance. If there is some sort of UI widget that Ionic doesn’t provide that you want, then Stencil would be how you would make it, and then you would wire it into whatever framework you are using. That’s the true point of Stencil - to make framework-independent components. The only time you would use it for performance optimization is if you think you can out-Ionic Ionic. Again, I don’t think I even could do that, and even if I was going to try, I would simply fork Ionic itself (the source is all available) to make my improvements. Ionic components you don’t use don’t cost you anything in terms of performance - they get tree-shaken out of your app binary entirely.

As y’all covered above, the bulk of performance complaints about Ionic (or Angular) really come down to people blaming their tools for what are fundamentally app design flaws, such as I have 3000 items in a popup menu, my 400-item list takes forever, custom colors bloated my app binary, the sort pipe is too slow, and so on. Avoid falling into those traps (or climb out of them when you do), and you should be fine.