edgedb-js
edgedb-js copied to clipboard
Parallel query file generation
Describe the proposed feature A clear and concise description of the syntax, what you want to happen, and why it's needed.
Our ~250 edgeql queries takes about 45 seconds to generate one at a time with @edgedb/generate queries. I understand medium term this is probably solved by persistent query cache but even then it would be nice to generate any new files in parallel.
@jackfischer are you using the --file option or are you writing multiple files?
We're writing a separate file for each query.
It feels like a wonky idea, but the generated ts file -especially the copy-pasted query string- could function as a key to check against, whether a particular .edgeql file is a new or a modified one in the working directory. So if there is a match between a given .edgeql file and its generated .edgeql.ts file's query, the generator could skip compilation for that (only if there are no schema changes of course...) At the same time, I'm using the generator to preheat the query cache :D