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 has been built, tested, and delivered into 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 hesitatingly click on it; and as expected, we’re presented with a vague description that the application is slow but gives little detail.

10.1        Slow performing traversal

10.1.1                  Explaining our traversal

10.1.2                  Profiling our traversal

10.1.3                  Indexes

10.2        Dealing with supernodes

10.2.1                  What makes a supernode?

10.2.2                  Monitoring for supernodes

10.2.3                  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

10.5        Summary