Fork me on GitHub
#pathom
<
2021-04-22
>
prnc15:04:51

As I understand p.eql/process in it’s output is silent about Exceptions. thrown in resolvers? Is checking the meta data, the recommended way of checking for errors atm? E.g.

(-> process-result
      (meta)
      ::pcr/run-stats
      ::pcr/node-run-stats
      ::pcr/nodes-with-error)
Or are there other error handling strategies?

prnc15:04:39

Ah nice, thanks! I’ve read through the debugging page but I didn’t get to plug-ins!

henrik15:04:19

@wilkerlucio I have to say though, Pathom 3 seems really snappy. We wrapped all resolvers in Honeycomb logs, and played around with the different parsers/resolvers in Pathom 2, along with batching. Then we threw Pathom 3 into the mix (and immediately got problems due to the well-known batching problem) Bottom line, Pathom 3 without parallelism or batching is just as performant for our particular use case as Pathom 2 with parallelism, batching, & tweaks, if not better. So many kudos on the great work, but also, why is this so? 😄 Does Pathom 3 produce more clever plans?

wilkerlucio16:04:54

hello Henrik! glad to hear about these benchmarks, you make my day happier 🙂 about how, its because Pathom 3 goes much more strait to the point than Pathom 2. Pathom 2 still follows the same parser/readers abstraction that were created by David Nolen in the first versions of Om.next. by that time, connect ideas were inexistent. later when I got to the connect idea on Pathom 2, it was an addition to it, so it has to accomodate itself there. in Pathom 3, instead of connect having to “go around” the readers interface, connect is the main thing in Pathom 3, and anything else needs to go around that. This allows me to optimize in such a way that wouldn’t be possible in Pathom 2 the new planner thing also helps, Pathom 2 keeps planning (and in case of errors, replanning) all the time while it runs. Pathom 3 model plans once per entity, and that thing is cached, so all the traversing code to figure things out can be isolated, and by the time Pathom 3 is “running”, it can just go traversing the plan nodes, never needs to replan And most important, I started Pathom 3 with the previous experience about what was bad about Pathom 2, that surely helps me avoid some pitfalls

👍 2
henrik08:04:08

From where I'm sitting, it certainly looks like Pathom 3 is calling the resolvers fewer times than Pathom 2 did, which might account for the performance: it seems to be doing less work. This seems to be the case even though you recently turned off some optimizations, from what it sounds like. I also noticed that I could severely suboptimize Pathom using batching. I don't remember if this was Pathom 2 or 3, but when I turned on batching it seems like it ended up calling more resolvers (though, in parallell, due to how I implemented the batching). From this it seems like it really isn't worth batching too aggressively, unless you know that the resolver is going to quite expensive to run per individual call.

wilkerlucio13:04:06

about the batching too aggressively, that’s correct, its not worth, batch adds some overhead of its own to happen, so unless the batch cost can come with a good difference from individuals, the individuals will be faster. the future solution for this will be parallel parsing, since it will be able to handle multiple items without relying on batch, that should be good for those cases (and no need for extra configuration, like batch needs)

henrik08:04:48

Yeah, I've noticed that it's hard to get any I/O to Datomic faster with batching, since it's not really "I/O", and Datomic caches aggressively.

littleli21:04:39

@wilkerlucio I have a progress on windows build / release process of pathom-viz with github actions. stay tuned for PR.

🎉 4
🙏 2
littleli21:04:16

trick is, you have to use shell: powershell and once you're down this rabbit hole you have to have two run builds. One for MacOS and Linux, and separate one for Windows.

littleli21:04:47

ifs are ugly, but since the matrix is small its probably acceptable.

wilkerlucio22:04:16

merged, I’m doing a few design adjusts in the Requests tab

wilkerlucio22:04:38

them I’ll make a tag so we get the windows release on the main repo 🙂

littleli22:04:40

Congratulation sir! Your application runs on one more platform 🙂

wilkerlucio22:04:17

without requiring the user to compile itself 🙂

👍 2
wilkerlucio22:04:37

I’m updating the docs in Pathom 3 as well, and making the announcement text, will be up in a min

littleli23:04:09

as I promised to you once. I added Pathom-viz to scoop bucket and it can now be installed with scoop installer from the command line.

🙏 3
wilkerlucio13:04:06

about the batching too aggressively, that’s correct, its not worth, batch adds some overhead of its own to happen, so unless the batch cost can come with a good difference from individuals, the individuals will be faster. the future solution for this will be parallel parsing, since it will be able to handle multiple items without relying on batch, that should be good for those cases (and no need for extra configuration, like batch needs)