5 ms·
Somehow webpack/JS/React has way faster build times than Java/Android apps. That's the main reason we completely abandoned fully native apps in Java/Swift in fa
by giorgioz 6y ago
Somehow webpack/JS/React has way faster build times than Java/Android apps.
That's the main reason we completely abandoned fully native apps in Java/Swift in favor of webapps with a tiny native wrapper app for the few only-native calls we need.
And to move forward this trend, new bundlers are appearing in JS like esbuild/snowpack that are even faster than webpack.
This is why the web will always win in the long run.
While the Android team in working on their tooling and Apple on other tooling and Windows on other tooling on the web all tooling is shared. You don't need the OS/platform gatekeeper to come up with faster bundlers. You just need one company/opensource team to make a breakthrough tool.
Finally this is the point why I believe TYPES ARE NOT WORTH IT. Types make the whole development slower. To me is better to be able to try and run the code faster in development and try it manually several times than to wait longer for type checks. Typing is overrated in my opinion.
- christophilus 6y agoWith esbuild, typed code compiles just as fast as untyped code (esbuild doesn’t typecheck just strips the types) so I don’t buy your last argument. Esbuild gives the best of both worlds, imho.
- Aeolun 6y agoThe problem with esbuild is that it doesn’t do hot reload (yet?)
- christophilus 6y agoI don’t like hotreload, so I don’t see it as a problem. I do a full rebuild and my browser auto refreshes and that’s good enough for me. I’ve had hot reload get me into an invalid state too often to find it useful.
- metachris 6y agoFor working on complex webapps that take a bunch of steps to arrive at a certain state, hot reloading can save a ton of time, since you don't have to redo the steps to get there. One of the bigger time-savers for web development, in my opinion.
- giorgioz 6y agoI've never tried esbuild. I've only saw the benchmarks. Frankly everytime they say this new X language/tool manages types fast it turns out not to be true. Deno has native types and then it came out that the actual Deno source code decided to abandon Typescript: https://startfunction.com/deno-will-stop-using-typescript/ https://startfunction.com/deno-will-stop-using-typescript/ https://esbuild.github.io/content-types/#typescript https://esbuild.github.io/content-types/#typescript It seems esbuild has a separate loader for typescript and anyway it only builds but does not type checking: "However, esbuild does not do any type checking so you will still need to run tsc -noEmit in parallel with esbuild to check types. This is not something esbuild does itself."
- Aeolun 6y ago> even faster than webpack Even faster than webpack? This thing is dog slow to me. Sit here compiling for 40 seconds every time I restart my app. That may be nice if you previously had minutes of compile time, but I came from PHP where everything was instant. > Typing is overrated in my opinion. For very small projects, maybe. For large 100k+ LOC projects, most definitely not.
- giorgioz 6y agoWell I was comparing client-side apps like Android/Java VS React/JS. PHP vs React/JS is not really an apple to apple comparison because you still need client code to achieve high interactivity like Gmail did first. Few questions on how to improve your webpack build/hot-reloading time: Are you on webpack5? Are you using Yarn 2 PnP? Did you break the app in multiple import() modules? we have a very large mono-repo all with like 30 services 10 webapps and 4 native app wrappers. The main B2B app is the biggest with like 50 separate pages and 100 modals/dialogs. The build time is around 40 seconds to produce the production bundles. More impotantly than that though is the weback serve/dev-server/hot-reload update time and that takes 1-3 seconds. Essentially if I can a letter in the UI and I save it take 1-3 seconds to see in the browser. This is with the largest webapp we have. All other webapps refresh in less than a second and essentially time you switch from the editor to the browser the page has already been refreshed.
- malinens 6y agoWebpack 5 for example is significantly slower than Webpack4. There are hacks to speed it up but you need to make workarounds or turn off features to get acceptable speeds. This makes it needlessly complicated to configure and manage project just to compile JS...
- xxpor 6y ago>Somehow webpack/JS/React has way faster build times than Java/Android apps. That's the main reason we completely abandoned fully native apps in Java/Swift in favor of webapps with a tiny native wrapper app for the few only-native calls we need. I'm sure your users are glad you're giving them a worse experience because your build times are marginally faster.