:: krowemoh

Thursday | 26 DEC 2024
Posts Links Other About Now

previous
next

Vue vs EJS

2022-02-28

I'm probably using vue incorrectly and I think I'll need to figure out what about my work is screwing it up. The issues I'm having is that even after shipping over a ton of json, the actual templating and reactivity is slow. Then, after the page is fully built, there is still weirdness in the input box which I think is related to the reactivity of the nested json that I'm loading.

Overall, vue seems great but for some of these bigger pages where I send over 10mb of just text and build dom elements it is painful. Rendering on the server with ejs however has none of that issue. After enabling gzip, its actually pretty good and works really well.

I should try using gzip with vue as well as I turned it on only after I saw that ejs was doing much better but I imagine it could help with the data transmission part for the vue test. However vue's problem seems to be deeper as its not the data transmission that I was annoyed with.

It's also really neat how easy it was to flip from vue to ejs, the syntax is close enough that I had no issues with it. EJS actually simplified a lot of the templating logic and I do think EJS style templating is better than vue.

Really, if I could get vue and ejs together without the huge loading of a library, I think that would be perfect.