Fork me on GitHub
#shadow-cljs
<
2017-10-07
>
thheller08:10:10

@mhuebert did you ever experiment with running the compiler in a web worker but eval in the page? that would probably solve all performance concerns at the cost of slightly higher memory usage

thheller09:10:13

I modified my test impl to use a webworker to run the self host compiler, this offloads all the “slow” stuff to the worker

thheller09:10:23

eval happens in the worker as well as the “host”

thheller09:10:57

could be optimized a ton but seems to have far better performance

thheller09:10:41

although it still locks up just from the eval, so overall its probably not worth it

mhuebert11:10:18

No, i hadn't tried that. Wasn't sure how complicated state sharing between the two environments would be

mhuebert11:10:57

Or if only passing compiled strings is sufficient

mhuebert11:10:02

If a compiler state atom still available in evaluating, or if it needs to be

mhuebert11:10:55

At ClojureBridge today so not much time

thheller14:10:09

if you need access to the compiler state then web worker is not great

thheller14:10:26

forgot that the maria editor might need that

mhuebert15:10:19

I guess depends on how big a difference it makes to performance. Does evaluation need to happen in the worker at all? Introspection maybe can be a special case

mhuebert16:10:36

Have to try that and see.