When you insert 20 messages, there is way more happening than 20 db writes.
Each insert will affect the UI which will cause a layout change. Also the changes will be replayed in different browser tabs and might also be replicated to the backend. Then there is things like conflict resolution, validation and encryption.
You just cannot compare these speeds with your MySQL insert operation.
You see, the fact that you do all that for a write is what's wrong. The interface should be decoupled from the message write, and the GUI notified a change has happened and update if needed.
The browser is an abstraction layer. It will always be slower.
But all this does not matter because your user will not write 20 chat messages / second.
I hate to say slippery slope but - its bad, so why not make more bad stuff on top of it. I feel the bad parts of the browser are glossed over in software development decisions, this is a very bad approach for any engineering discipline. The surprising thing is how few software devs know how to do anything non browser, how can proper technology evaluations be performed without this? This is just the latest in a long line of such.
I just described the world how it is. I did not create it, I did not made the browser. I do not understand your point. You want to complain about what exactly?
I thought it was fairly clear - using the browser for an offline database is dumb. Even worse, by propagating this sort of nonsense it encourages new devs to think thats how things are done, when you can do the same thing with a native app, 10 or 100 times faster and take perhaps a tenth or even less the time taken to develop it.
Edit: and as I said at the beginning - "I often feel I'm on another planet" - having this discussion with web developers trying to justify something that is not just bad but dumb in so many ways always gives me a chuckle, and I try to educate on why there are other things beside browsers, and its not a very good way to write software