instaparse 2017-12-13

hmm, I have a rather large EBNF that I’m using to initialize an instaparse parser in ClojureScript

It works just fine but the problem is that the parser creation takes a long time and since it’s ClojureScript that causes the UI to freeze while it is being created

I was wondering if there is any way to do this in a webworker and if anyone has tried to do that before

my initial feeling is that “no you cannot use webworkers” since they work with message passing and as such only Strings can be passed

@niklas.collin are you using the defparser macro?

no, I’m using instaparse.core/parser

I wonder if you'd be faster if you'd be using the macro, then it precompiles a bit.

dunno, maybe

well, that’s what the defparser documentation in instaparse github page says that it should work better

thanks, will try that

👍 1

yeah, now performance is pretty much instant

@hlolli yep, that's exactly what it's meant for. @niklas.collin I'm glad it served its purpose!