These are chat archives for opal/opal

27th
Oct 2017
Forrest Chang
@fkchang
Oct 27 2017 01:13
@elia the JS object direct syntax is something I would be interested in, but I'd have to think through all the ramifications
Jan Biedermann
@janbiedermann
Oct 27 2017 12:17
@elia the compile performance problem i mentioned before, opal 0.11 being 3 times slower, well, its not. The new parser of 0.11 uses method_missing a lot, when method_missing got overwritten by something not that fast, that will have a very negative effect on compile times. Thats what happened.
Elia Schito
@elia
Oct 27 2017 13:44
@janbiedermann interesting! you have any pointers in the code? I'd like to understand what's going on in a more tangible way
Jan Biedermann
@janbiedermann
Oct 27 2017 14:15
yes, i used stackprof gem to profile the compilation from within the opal-sprockets processor. method_missing is called a lot at the end of the process, but the trace doesn't give more detail than Opal::Compiler#compile here, and during parsing, its called most of the time from lib/parser/lexer.rb#advance.
You can see the most dramatic effect by compiling this lexer.rb from within sprockets.
This file compiled manually takes ~4s, in sprockets it took ~190s, without method_missng overwritten this file still takes much longer to compile. The time used then within Parser::AST::Node#assign_properties. I don't understand yet whats different there to the "manual" compile.
maybe i need to increase the stackprof resolution there.
Elia Schito
@elia
Oct 27 2017 15:04
@iliabylich see above, maybe you have some more insight into this
Jan Biedermann
@janbiedermann
Oct 27 2017 19:07

Another 0.11 issue, an out of place top level constant:

undefined method `component_did_mount' for class `String::Hyperloop::Component::Mixin'

The odd thing here being the String
This does not happen on 0.10.5, but on 0.11 master.
I followed it in the debugger, $parent() $$parent for Hyperloop look fine, this String comes from $$base_module, this gets set when a modules is loaded. What stopped me here is, this Hyperloop::Whatever::Something appears on to many places. How can i find the cause of this?

Jan Biedermann
@janbiedermann
Oct 27 2017 23:12
@elia @iliabylich the thing that was causing this performance problems really was that const missing. The other issue, for the remaining performance problem, has been an issue with my environment. I fixed that. Sorry if caused trouble. All works fine now and beautifully fast.