10 Performance, pitfalls, and anti-patterns

 

This chapter covers

  • Diagnosing and debugging common performance problems with traversals
  • Understanding, locating, and mitigating supernodes
  • Identifying common application anti-patterns

Our application is built, tested, and delivered to production. We spent a lot of effort designing a system to run in a resilient and scalable manner. However, entropy is not on our side. Everything is humming along perfectly, until one day, we receive that dreaded bug ticket, “Application is slow.” Knowing what’s likely inside, we hesitantly click on the message, and as expected, we’re presented with a vague description that says the application is slow, but otherwise gives little detail.

10.1 Slow-performing traversals

10.1.1 Explaining our traversal

10.1.2 Profiling our traversal

10.1.3 Indexes

10.2 Dealing with supernodes

10.2.1 It’s about instance data

10.2.2 It’s about the database

10.2.3 What makes a supernode?

10.2.4 Monitoring for supernodes

10.2.5 What to do if you have a supernode

10.3 Application anti-patterns

10.3.1 Using graphs for non-graph use cases

10.3.2 Dirty data

10.3.3 Lack of adequate testing

10.4 Traversal anti-patterns

10.4.1 Not using parameterized traversals

10.4.2 Using unlabeled filtering steps

Summary