ClojureScript and size for a mobile application

I just have a common problem. I wrote a simple viewpager in html / css / javascript that allows me to scroll between β€œpages” like you, using the viewpager in android and / or iphone. The required javascript for this was less than 1kb. When I converted this to ClojureScript, the resulting code with optimization and the lack of beautiful printing ended up at about 62 kb.

What I need is that ClojureScript is so large and does much more than regular javascript, that it will be slow for a full-fledged mobile application.

Can anyone calm down? Anyone have experience with this?

+4
source share
1 answer

There are quite a few Clojure data structures and basic library functions that need to be compiled in JS, which is probably most of this 60kB. I would not worry too much about the size of JavaScript, as most assets (i.e. Images) predominate in most mobile applications. Regarding speed, the usual rules apply: be careful with DOM manipulations and layout / redrawing.

Why it's worth The Weathertron iOS application is written using ClojureScript + Angular.js and it performs just fine.

+7
source

Source: https://habr.com/ru/post/1496331/


All Articles