Hi @jamesnvc, cljs perf is definitely a bit slow. You need to be using advanced mode compile otherwise it’s incredibly slow.
I’m the guy who did the port
@lucasbradstreet: Cool, thanks :simple_smile: Good to know I’m (maybe) not just doing something crazy
Depending on what you’re doing, you can also serialise the parser definition and load it in directly
Creating the initial parser in cljs can take quite a while, but the parsing itself can be pretty acceptable
and my money was on crazy @jamesnvc
can any of that "job" be split between client and server?
say for a chat app
just send the user keystrokes to the server - do it in clj there
just brainstorming
outloud
doesn't each keystroke go to the server already - that's how you can display the fact that the user is typing
so don't do any processing on the client - do the instaparse on the server
and use yada or onyx or something to scale it
we can segregrate services on the server and compose them
compose microservices on the server and keep the client relatively stupid whenever the data is already on the server
I was parsing excel formulas on the client and it was good enough
Certainly faster than a round-trip to the server
ok
I'll defer to @jamesnvc since I'm just blowing smoke
My overall experience was that creating the initial parser was very expensive, but overall parsing was OK, but that it had to be in advanced mode. All with a big chunk of “your mileage may vary”. Unfortunately I don’t have any time to work on performance any further
Cool, I was thinking of splitting it between client and server, but I will give it a shot with advanced compliation too
Also works. I’d measure how long it takes to do the individual parses, not just page load time - because that will be affected by creating the initial parser
@jamesnvc: we should test both and not make assumptions either way, imnsho
@lucasbradstreet: thanks for the help and suggestions - much appreciated
Agreed. Though you have to assume some variability in request latency when testing the other method, which is why I ultimately went with the client side approach. That said, you can have slow CPU clients too.
then we should simulate issues with both environments and various combinations/permutations
ask the #C0J20813K team how good I am at doing that
issues, oh yeah, I got issues
ha :thumbsup:
:simple_smile: