~/talk

GraphQL - Accelerated

Talkat Node+JS Interactive 2018 · on Wednesday, 2018-10-10· at 11:40· West Meeting Room 118-120· [graphql, web-performance]
slides:none on file

Benchmarks use clinic flame to show GraphQL spends most CPU time parsing, validating and walking the AST on every request, so an LRU cache of parsed/validated queries in fastify-gql cuts work and yields about 3–4× throughput for typical enterprise apps. For hot queries a JIT step compiles validated ASTs into JavaScript (via controlled codegen/eval), adding ~30% on trivial cases and approaching ~2× on realistic complex queries; after that parsing and HTTP become the dominant bottlenecks.

AI-written summary · about

  1. 0:00GraphQL Accelerated
  2. 2:12Nonstandard
  3. 7:20A popular community GraphQL framework is Apollo
  4. 7:45Makes prototyping easy!
  5. 8:36In the last few months, several customers felt GraphQL was underperforming compared to REST.
  6. 11:14On each and every request the server first has to parse the query to produce an Abstract Syntax Tree and then walk that to execute the query
  7. 13:09Caching!
  8. 14:13Experimental implementation
  9. 14:38Uses an LRU to cache stable queries
  10. 14:59npm install fastify-gal
  11. 16:21We did additional performance analysis using clinic flame
  12. 17:32on the fly code generation
  13. 20:49Using our improvements GraphQL becomes very competitive to rolling your own stack
  14. 22:28Come to our booth!
  15. 22:47Check out our workshop: A new way to profile async activity in Node.js.
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.