Skip to content
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

Any plan to support Opal 1.2.0? #81

Open
zw963 opened this issue Aug 11, 2021 · 2 comments
Open

Any plan to support Opal 1.2.0? #81

zw963 opened this issue Aug 11, 2021 · 2 comments

Comments

@zw963
Copy link

zw963 commented Aug 11, 2021

Thanks

@jgaskins
Copy link
Member

I haven't been following Opal development for a while. What does 1.2 provide that 0.10 doesn't?

There are a few reasons I haven't spent the effort to keep it up to date with the latest Opal versions:

  • the Opal runtime+corelib gets larger with every release
    • on Opal 0.10.6, a very simple Clearwater app using GrandCentral for state management is 103KB minified and gzipped
    • on Opal 1.2, the same app is 145KB — 40% larger
    • this not only takes longer to transfer over the wire, but presumably requires more CPU at load time to parse and evaluate, with unknown effects on runtime performance
    • I didn't check to see that this runs, to be clear, and it probably doesn't. I just managed to get a compiled artifact.
  • Opal also doesn't support Sprockets anymore, so I would have to rework how Clearwater and all related gems integrate with Opal
    • unfortunately, I don't know how to do that
    • the way I did it to check compiled asset size above was completely manual through the Opal CLI, including specifying dependency paths manually (opal -c -I../gem1_path/opal -I../gem2_path/opal -I../gem3_path/opal app.rb), which is probably not how you're supposed to do it 😄

If someone else wants to take on that work, I'm happy to merge PRs, but I don't have any problem with how Clearwater works right now and unless it's a huge net positive over Opal 0.10, including in terms of performance, I'd really like to at least maintain compatibility with 0.10 because Clearwater on Opal 0.10 is, AFAIK, the fastest front-end Ruby framework.

@zw963
Copy link
Author

zw963 commented Aug 12, 2021

What does 1.2 provide that 0.10 doesn't?

I guess the main reason is, 1.2 is 1.X serious, it should be more stable.

* Opal also doesn't support Sprockets anymore,

I don't really understand what you means, but, the latest opal 1.2.0 is works quite well with sprockets 4.X
use offical 'opal-sprockets` gem.

anyway, i don't think performance is the issue, it just a backend, maybe will switch to Crystal later, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants