-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drastic file size increase #52
Comments
It's pretty big. On a project I tried it on: So, yeah, ~69Kb for not having to type om/IRenderState, and being able to write (om/div {:on-click ...}) instead of (om/div #js {:onClick ...}). In a large project the readability might be worth the size/download-time cost though... |
It's actually not having to type ANY of the protocol definitions. Also, not having to put that nil argument in which litters every single call to a dom element helper. For complex UIs, this becomes a much more viable proposition for later reading (ie I don't have to "scan out the noise" as much as I read through the code... a principle which Rich Hickey seems to have applied very much to LISP when choosing the syntax of Clojure. Take let bindings in schemes or other lisps... they're so painful, the number of parens you have to use.) Having said this, I had similar concerns about my not using Schema at all and also the amount of extra code being included and generated around my simple usage of om-tools. It has been noted to me at that time that: |
That's sounds great! Is there more you can say about the upcoming optimizations? Expected reduction? ETA? PS: I use sablono which already eliminates all 'nil' arguments. |
@stephanos I'm not part of prismatic, or working on it. You'd have to ask the prismatic guys, in particular @loganlinn was the individual who replied to me. |
@stephanos I will look into removing any extra code generated from |
I integrated om-tools into David Nolen's original TodoMVC application and noticed that the app's final JavaScript output (with advanced compilation) grows from 201 KB (48KB gzipped) to 262 KB (61KB gzipped). Note: That's with Om, secretary and sablono but without React.js.
That seems quite excessive for basically only replacing
(reify ...)
withdefcomponent
. Did you observe a similar result for your project? Is there anything I can do to mitigate the increase?The text was updated successfully, but these errors were encountered: