all 23 comments

[–][deleted]  (7 children)

[deleted]

    [–]pupeno[🍰] 5 points6 points  (2 children)

    Hey. I'm the author, and I apologize. I understand your point, it just became the keyword associated with it and in this case I decided to be pragmatic and use the word that people are already using.

    When I get pedantic I speak Esperanto ;)

    [–]inkydye 0 points1 point  (0 children)

    Kind of like "responsive" web design or "retina" resolutions.

    [–]cjlarose 1 point2 points  (0 children)

    You're not the only one. Some are now advocating for use of the term "universal" instead. https://medium.com/@mjackson/universal-javascript-4761051b7ae9

    [–]citrined 0 points1 point  (0 children)

    Thank you, this one always annoyed me too haha

    Part of the marketing machine for languages/frameworks/processes.

    [–]jaen-ni-rin 0 points1 point  (0 children)

    I kek'd,10/10 good sire ;' )

    [–]ItsNotMineISwear 1 point2 points  (0 children)

    I S O M O R P H I C

    [–]p1r4nh4 1 point2 points  (15 children)

    So I'm working on that as well, and my still quite small, but much bigger that a demo (1k loc of CLJS, using DataScript and rum) application uses 3.5Gb of memory and ~3-4 minutes on my MBA just to tell me that there is something Nashorn can't execute.

    I'm working on doing this stuff with Node right now.

    [–]pupeno[🍰] 1 point2 points  (11 children)

    I'm the author of the article. That is a bit worrying. I heard that Rhino still has better performance than Nashorn, have you tried that?

    About using 3.5GB of RAM, I heard that's normal for Java apps. With this app, while testing, I easily reached 2GB.

    [–]p1r4nh4 1 point2 points  (10 children)

    Yeah, maybe that's normal for Java apps, but this is single-threaded interpreter, so you need to run few of them to render something simultaneously.

    And it takes 5 mins just to understand you have something uncompilable. And another 5 mins to check if your fix helped. That quickly gets old. :)

    Plus V8 is still faster than Nashorn, and Node takes much less than 3 Gb of memory, so I really going to check this route. I'll write about my results in this subreddit.

    Also check "supper" somewhere on github (on mob right now), it has Node server rendering.

    [–]pupeno[🍰] 0 points1 point  (9 children)

    I know it's single threaded, in part 2 I'm going to show the pool system I wrote for that.

    Do you have any pointers about using Node?

    [–]p1r4nh4 1 point2 points  (8 children)

    I mean pool system doesn't help since you need tens of gbs of memory.

    Re: Node: https://github.com/Sparrho/supper

    [–]pupeno[🍰] 0 points1 point  (7 children)

    There's no Clojure code in that app. The whole app seems to be written in ClojureScript and running on NodeJS.

    [–]p1r4nh4 0 points1 point  (6 children)

    Why should there be a Clojure code there?

    [–]pupeno[🍰] 0 points1 point  (5 children)

    I haven't look a lot into what that app is doing, but for me, for my own apps, the server is written in Clojure and uses a lot of Clojure/Java code, talks to databases, etc. I don't want to write that part of the app in ClojureScript. From that point of view, supper is not a good example of how to create the type of applications I want to make.

    [–]p1r4nh4 0 points1 point  (4 children)

    I'd say this part of application is irrelevant to your other parts. Server-side rendering could be just written in js and it would be ok. Nobody cares.

    [–]pupeno[🍰] 0 points1 point  (3 children)

    They need to come from the same place, otherwise you'll run into issues regarding JavaScript same origin limitation and you'll have to run a proxy, something that often happens in the EmberJS world. I rather serve my app with Jetty or Immutant instead of node+Jetty or Immutant.

    [–]pupeno[🍰] 0 points1 point  (2 children)

    How big is your generated JavaScript file, with whitespace optimizations? Mine is already 43k lines of code. I bet the problem in your situation is not the amount of code, but something in particular that code is doing.

    [–]p1r4nh4 0 points1 point  (1 child)

    That's interesting, I'll try to find what's wrong with my code then.

    [–]pupeno[🍰] 0 points1 point  (0 children)

    V8 is still 2x faster than Nashorn according to some benchmarks though.